aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@markmitchell.com>1999-02-22 13:34:33 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-02-22 13:34:33 +0000
commita4c6502a661a4d0a6e157e118c7be4178176f743 (patch)
tree0b06b500febf846a9be290f5b44393399d824d50 /gcc/cse.c
parent44768aae76f6fe77bea11f4a0e5fcf24d65c8f8c (diff)
downloadgcc-a4c6502a661a4d0a6e157e118c7be4178176f743.zip
gcc-a4c6502a661a4d0a6e157e118c7be4178176f743.tar.gz
gcc-a4c6502a661a4d0a6e157e118c7be4178176f743.tar.bz2
cse.c (dump_class): New function.
* cse.c (dump_class): New function. (invalidate_memory): Fix typo in comment. * function.c (temp_slot): Add an alias set field. (assign_stack_temp): Only reuse slots if they will have the same alias set as before. (combine_temp_slots): Don't combine if -fstrict-aliasing; that's unsafe. * rtl.c (copy_rtx): Copy all the flags (in particular, MEM_SCALAR_P). From-SVN: r25372
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 4e52bb4..7fa8116 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -663,9 +663,29 @@ static void cse_check_loop_start PROTO((rtx, rtx));
static void cse_set_around_loop PROTO((rtx, rtx, rtx));
static rtx cse_basic_block PROTO((rtx, rtx, struct branch_path *, int));
static void count_reg_usage PROTO((rtx, int *, rtx, int));
+static void dump_class PROTO((struct table_elt*));
extern int rtx_equal_function_value_matters;
+/* Dump the expressions in the equivalence class indicated by CLASSP.
+ This function is used only for debugging. */
+void
+dump_class (classp)
+ struct table_elt *classp;
+{
+ struct table_elt *elt;
+
+ fprintf (stderr, "Equivalence chain for ");
+ print_rtl (stderr, classp->exp);
+ fprintf (stderr, ": \n");
+
+ for (elt = classp->first_same_value; elt; elt = elt->next_same_value)
+ {
+ print_rtl (stderr, elt->exp);
+ fprintf (stderr, "\n");
+ }
+}
+
/* Return an estimate of the cost of computing rtx X.
One use is in cse, to decide which expression to keep in the hash table.
Another is in rtl generation, to pick the cheapest way to multiply.
@@ -7821,7 +7841,7 @@ cse_insn (insn, libcall_insn)
prev_insn = insn;
}
-/* Remove from the ahsh table all expressions that reference memory. */
+/* Remove from the hash table all expressions that reference memory. */
static void
invalidate_memory ()
{