]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cselib.h
Merge from pch-branch up to tag pch-commit-20020603.
[thirdparty/gcc.git] / gcc / cselib.h
CommitLineData
1617c276 1/* Common subexpression elimination for GNU compiler.
2fa871c1 2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999 Free Software Foundation, Inc.
1617c276 4
f12b58b3 5This file is part of GCC.
1617c276 6
f12b58b3 7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 2, or (at your option) any later
10version.
1617c276 11
f12b58b3 12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
1617c276 16
17You should have received a copy of the GNU General Public License
f12b58b3 18along with GCC; see the file COPYING. If not, write to the Free
19Software Foundation, 59 Temple Place - Suite 330, Boston, MA
2002111-1307, USA. */
1617c276 21
22/* Describe a value. */
1f3233d1 23typedef struct cselib_val_struct GTY(())
1617c276 24{
25 /* The hash value. */
26 unsigned int value;
1f3233d1 27 union cselib_val_u
1617c276 28 {
29 /* A VALUE rtx that points back to this structure. */
1f3233d1 30 rtx GTY ((tag ("1"))) val_rtx;
1617c276 31 /* Used to keep a list of free cselib_val structures. */
1f3233d1 32 struct cselib_val_struct * GTY ((skip (""))) next_free;
33 } GTY ((desc ("1"))) u;
1617c276 34
35 /* All rtl expressions that hold this value at the current time during a
36 scan. */
37 struct elt_loc_list *locs;
38 /* If this value is used as an address, points to a list of values that
39 use it as an address in a MEM. */
40 struct elt_list *addr_list;
41} cselib_val;
42
43/* A list of rtl expressions that hold the same value. */
1f3233d1 44struct elt_loc_list GTY(())
1617c276 45{
46 /* Next element in the list. */
47 struct elt_loc_list *next;
48 /* An rtl expression that holds the value. */
49 rtx loc;
50 /* The insn that made the equivalence. */
51 rtx setting_insn;
52};
53
54/* A list of cselib_val structures. */
1f3233d1 55struct elt_list GTY(())
1617c276 56{
57 struct elt_list *next;
58 cselib_val *elt;
59};
60
61extern cselib_val *cselib_lookup PARAMS ((rtx, enum machine_mode, int));
62extern void cselib_update_varray_sizes PARAMS ((void));
63extern void cselib_init PARAMS ((void));
64extern void cselib_finish PARAMS ((void));
65extern void cselib_process_insn PARAMS ((rtx));
66extern int rtx_equal_for_cselib_p PARAMS ((rtx, rtx));
67extern int references_value_p PARAMS ((rtx, int));
fdc1df6a 68extern rtx cselib_subst_to_values PARAMS ((rtx));