2 Copyright (C) 1987-2015 Free Software Foundation, Inc.
4 This file is part of GCC.
6 GCC is free software; you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation; either version 3, or (at your option) any later
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with GCC; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
22 #include "coretypes.h"
31 /* Iteratively hash rtx X into HSTATE. */
34 add_rtx (const_rtx x
, hash
&hstate
)
44 hstate
.add_object (code
);
46 hstate
.add_object (mode
);
50 hstate
.add_int (REGNO (x
));
53 hstate
.add_object (INTVAL (x
));
56 for (i
= 0; i
< CONST_WIDE_INT_NUNITS (x
); i
++)
57 hstate
.add_object (CONST_WIDE_INT_ELT (x
, i
));
61 hstate
.add (XSTR (x
, 0), strlen (XSTR (x
, 0)) + 1);
69 case DEBUG_IMPLICIT_PTR
:
70 case DEBUG_PARAMETER_REF
:
76 fmt
= GET_RTX_FORMAT (code
);
77 for (i
= GET_RTX_LENGTH (code
) - 1; i
>= 0; i
--)
81 hstate
.add_object (XWINT (x
, i
));
85 hstate
.add_object (XINT (x
, i
));
91 for (j
= 0; j
< XVECLEN (x
, i
); j
++)
92 inchash::add_rtx (XVECEXP (x
, i
, j
), hstate
);
95 inchash::add_rtx (XEXP (x
, i
), hstate
);
100 hstate
.add (XSTR (x
, 0), strlen (XSTR (x
, 0)) + 1);