00001 /* Common subexpression elimination for GNU compiler. 00002 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 00003 1999, 2003, 2004, 2005 Free Software Foundation, Inc. 00004 00005 This file is part of GCC. 00006 00007 GCC is free software; you can redistribute it and/or modify it under 00008 the terms of the GNU General Public License as published by the Free 00009 Software Foundation; either version 2, or (at your option) any later 00010 version. 00011 00012 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 00013 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00015 for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with GCC; see the file COPYING. If not, write to the Free 00019 Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 00020 02110-1301, USA. */ 00021 00022 /* Describe a value. */ 00023 typedef struct cselib_val_struct GTY(()) 00024 { 00025 /* The hash value. */ 00026 unsigned int value; 00027 union cselib_val_u 00028 { 00029 /* A VALUE rtx that points back to this structure. */ 00030 rtx GTY ((tag ("1"))) val_rtx; 00031 /* Used to keep a list of free cselib_val structures. */ 00032 struct cselib_val_struct * GTY ((skip)) next_free; 00033 } GTY ((desc ("1"))) u; 00034 00035 /* All rtl expressions that hold this value at the current time during a 00036 scan. */ 00037 struct elt_loc_list *locs; 00038 /* If this value is used as an address, points to a list of values that 00039 use it as an address in a MEM. */ 00040 struct elt_list *addr_list; 00041 00042 struct cselib_val_struct *next_containing_mem; 00043 } cselib_val; 00044 00045 /* A list of rtl expressions that hold the same value. */ 00046 struct elt_loc_list GTY(()) 00047 { 00048 /* Next element in the list. */ 00049 struct elt_loc_list *next; 00050 /* An rtl expression that holds the value. */ 00051 rtx loc; 00052 /* The insn that made the equivalence. */ 00053 rtx setting_insn; 00054 /* True when setting insn is inside libcall. */ 00055 bool in_libcall; 00056 }; 00057 00058 /* A list of cselib_val structures. */ 00059 struct elt_list GTY(()) 00060 { 00061 struct elt_list *next; 00062 cselib_val *elt; 00063 }; 00064 00065 extern cselib_val *cselib_lookup (rtx, enum machine_mode, int); 00066 extern void cselib_init (bool record_memory); 00067 extern void cselib_clear_table (void); 00068 extern void cselib_finish (void); 00069 extern void cselib_process_insn (rtx); 00070 extern enum machine_mode cselib_reg_set_mode (rtx); 00071 extern int rtx_equal_for_cselib_p (rtx, rtx); 00072 extern int references_value_p (rtx, int); 00073 extern rtx cselib_subst_to_values (rtx); 00074 extern void cselib_invalidate_rtx (rtx);
1.5.6