summaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-20 00:24:32 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-20 00:24:32 +0000
commit18aa2adf943ab8f76bcf9205845a57a018006034 (patch)
tree934ca7a916b884debf2659218bd495fc6afaa368 /gcc/loop.c
parent36e32a8c47d46402da65a50d868347b8e7a22434 (diff)
downloadgcc-18aa2adf943ab8f76bcf9205845a57a018006034.tar.gz
* Global CSE and constant/copy propagation.
* Makefile.in (OBJS): Add gcse.o (STAGESTUFF): Add *.gcse. (gcse.o): Add dependencies. (mostlyclean): Remove *.gcse and */*.gcse. * gcse.c: New file. * loop.c (loop_optimize): Move call to init_alias_analysis. * recog.c (validate_replace_src): New function. * toplev.c (gcse_dump): New global variable. (flag_gcse, gcse_time): Likewise. (compile_file): Initialize gcse_time and clean out the gcse dump file if necessary. (rest_of_compilation): Call gcse_main as requested. Dump RTL after gcse if requested. (main): Enable gcse for -O2 and above. Handle -dG. Enable gcse dumps for -da. * gcc.texi: Add gcse related internal documentation. * invoke.texi: Note new command line options for gcse. * tm.texi: Document AVOID_CCMODE_COPIES. * mips.h (AVOID_CCMODE_COPIES): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19901 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index ce0b9b02631..8bc4ef28fac 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -400,7 +400,6 @@ loop_optimize (f, dumpfile, unroll_p)
loop_dump_stream = dumpfile;
init_recog_no_volatile ();
- init_alias_analysis ();
max_reg_before_loop = max_reg_num ();
@@ -477,6 +476,13 @@ loop_optimize (f, dumpfile, unroll_p)
function. */
reg_scan (f, max_reg_num (), 1);
+ /* This must occur after reg_scan so that registers created by gcse
+ will have entries in the register tables.
+
+ We could have added a call to reg_scan after gcse_main in toplev.c,
+ but moving this call to init_alias_analysis is more efficient. */
+ init_alias_analysis ();
+
/* See if we went too far. */
if (get_max_uid () > max_uid_for_loop)
abort ();