From 7506f49132276e0bd064a169dca106b6436bde7c Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Wed, 20 May 1998 00:24:32 +0000 Subject: * 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. Co-Authored-By: Jeffrey A Law From-SVN: r19901 --- gcc/loop.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gcc/loop.c') diff --git a/gcc/loop.c b/gcc/loop.c index ce0b9b0..8bc4ef2 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 (); -- cgit v1.1