00001 /* Common subexpression elimination for GNU compiler. 00002 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 00003 1999 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, 59 Temple Place - Suite 330, Boston, MA 00020 02111-1307, 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 } cselib_val; 00042 00043 /* A list of rtl expressions that hold the same value. */ 00044 struct elt_loc_list GTY(()) 00045 { 00046 /* Next element in the list. */ 00047 struct elt_loc_list *next; 00048 /* An rtl expression that holds the value. */ 00049 rtx loc; 00050 /* The insn that made the equivalence. */ 00051 rtx setting_insn; 00052 /* True when setting insn is inside libcall. */ 00053 bool in_libcall; 00054 }; 00055 00056 /* A list of cselib_val structures. */ 00057 struct elt_list GTY(()) 00058 { 00059 struct elt_list *next; 00060 cselib_val *elt; 00061 }; 00062 00063 extern cselib_val *cselib_lookup PARAMS ((rtx, enum machine_mode, int)); 00064 extern void cselib_update_varray_sizes PARAMS ((void)); 00065 extern void cselib_init PARAMS ((void)); 00066 extern void cselib_finish PARAMS ((void)); 00067 extern void cselib_process_insn PARAMS ((rtx)); 00068 extern int rtx_equal_for_cselib_p PARAMS ((rtx, rtx)); 00069 extern int references_value_p PARAMS ((rtx, int)); 00070 extern rtx cselib_subst_to_values PARAMS ((rtx));
1.5.6