New testcase
[official-gcc.git] / gcc / cselib.h
blob879b9c6c3d5d2b77ff55c26381944aadedaa68d0
1 /* Common subexpression elimination for GNU compiler.
2 Copyright (C) 1987, 88, 89, 92-7, 1998, 1999 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* Describe a value. */
22 typedef struct cselib_val_struct
24 /* The hash value. */
25 unsigned int value;
26 union
28 /* A VALUE rtx that points back to this structure. */
29 rtx val_rtx;
30 /* Used to keep a list of free cselib_val structures. */
31 struct cselib_val_struct *next_free;
32 } u;
34 /* All rtl expressions that hold this value at the current time during a
35 scan. */
36 struct elt_loc_list *locs;
37 /* If this value is used as an address, points to a list of values that
38 use it as an address in a MEM. */
39 struct elt_list *addr_list;
40 } cselib_val;
42 /* A list of rtl expressions that hold the same value. */
43 struct elt_loc_list
45 /* Next element in the list. */
46 struct elt_loc_list *next;
47 /* An rtl expression that holds the value. */
48 rtx loc;
49 /* The insn that made the equivalence. */
50 rtx setting_insn;
53 /* A list of cselib_val structures. */
54 struct elt_list
56 struct elt_list *next;
57 cselib_val *elt;
60 extern cselib_val *cselib_lookup PARAMS ((rtx, enum machine_mode, int));
61 extern void cselib_update_varray_sizes PARAMS ((void));
62 extern void cselib_init PARAMS ((void));
63 extern void cselib_finish PARAMS ((void));
64 extern void cselib_process_insn PARAMS ((rtx));
65 extern int rtx_equal_for_cselib_p PARAMS ((rtx, rtx));
66 extern int references_value_p PARAMS ((rtx, int));