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"
30 /* Iteratively hash rtx X into HSTATE. */
33 add_rtx (const_rtx x
, hash
&hstate
)
43 hstate
.add_object (code
);
45 hstate
.add_object (mode
);
49 hstate
.add_int (REGNO (x
));
52 hstate
.add_object (INTVAL (x
));
55 for (i
= 0; i
< CONST_WIDE_INT_NUNITS (x
); i
++)
56 hstate
.add_object (CONST_WIDE_INT_ELT (x
, i
));
60 hstate
.add (XSTR (x
, 0), strlen (XSTR (x
, 0)) + 1);
68 case DEBUG_IMPLICIT_PTR
:
69 case DEBUG_PARAMETER_REF
:
75 fmt
= GET_RTX_FORMAT (code
);
76 for (i
= GET_RTX_LENGTH (code
) - 1; i
>= 0; i
--)
80 hstate
.add_object (XWINT (x
, i
));
84 hstate
.add_object (XINT (x
, i
));
90 for (j
= 0; j
< XVECLEN (x
, i
); j
++)
91 inchash::add_rtx (XVECEXP (x
, i
, j
), hstate
);
94 inchash::add_rtx (XEXP (x
, i
), hstate
);
99 hstate
.add (XSTR (x
, 0), strlen (XSTR (x
, 0)) + 1);