diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-12-01 14:36:51 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-12-01 07:36:51 -0700 |
commit | 45c85c4e716882cb15fdf1922951d79cb5cd75f5 (patch) | |
tree | b6298e3b4294dc7111e2de5f920efe6f9fecf447 | |
parent | 82371d41c2e0a1e8c68c43748a71bb9deec0ed1a (diff) | |
download | gcc-45c85c4e716882cb15fdf1922951d79cb5cd75f5.zip gcc-45c85c4e716882cb15fdf1922951d79cb5cd75f5.tar.gz gcc-45c85c4e716882cb15fdf1922951d79cb5cd75f5.tar.bz2 |
reload1.c (reload): Do not set reload_completed or split insns here.
* reload1.c (reload): Do not set reload_completed or split insns
here. Instead...
* toplev.c (rest_of_compilation): Set reload_completed after
reload returns. Split insns after reload_cse has run.
From-SVN: r24037
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/reload1.c | 22 | ||||
-rw-r--r-- | gcc/toplev.c | 30 |
3 files changed, 37 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ac20dac..37abb2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Tue Dec 1 15:20:44 1998 Jeffrey A Law (law@cygnus.com) + + * reload1.c (reload): Do not set reload_completed or split insns + here. Instead... + * toplev.c (rest_of_compilation): Set reload_completed after + reload returns. Split insns after reload_cse has run. + Tue Dec 1 11:55:04 1998 Richard Henderson <rth@cygnus.com> * final.c (final_scan_insn): Abort if block_depth falls below 0. diff --git a/gcc/reload1.c b/gcc/reload1.c index d27663c..1b94254 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1100,10 +1100,6 @@ reload (first, global, dumpfile) } } - /* We've finished reloading. This reload_completed must be set before we - perform instruction splitting below. */ - reload_completed = 1; - /* Make a pass over all the insns and delete all USEs which we inserted only to tag a REG_EQUAL note on them. Remove all REG_DEAD and REG_UNUSED notes. Delete all CLOBBER insns and simplify (subreg (reg)) operands. */ @@ -1135,24 +1131,6 @@ reload (first, global, dumpfile) /* And simplify (subreg (reg)) if it appears as an operand. */ cleanup_subreg_operands (insn); - - /* If optimizing and we are performing instruction scheduling after - reload, then go ahead and split insns now since we are about to - recompute flow information anyway. */ - if (optimize && flag_schedule_insns_after_reload) - { - rtx last; - - last = try_split (PATTERN (insn), insn, 1); - - if (last != insn) - { - PUT_CODE (insn, NOTE); - NOTE_SOURCE_FILE (insn) = 0; - NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED; - } - } - } /* If we are doing stack checking, give a warning if this function's diff --git a/gcc/toplev.c b/gcc/toplev.c index e5c9319..e0fc108 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3968,10 +3968,40 @@ rest_of_compilation (decl) if (failure) goto exit_rest_of_compilation; + reload_completed = 1; + /* Do a very simple CSE pass over just the hard registers. */ if (optimize > 0) reload_cse_regs (insns); + /* If optimizing and we are performing instruction scheduling after + reload, then go ahead and split insns now since we are about to + recompute flow information anyway. + + reload_cse_regs may expose more splitting opportunities, expecially + for double-word operations. */ + if (optimize > 0 && flag_schedule_insns_after_reload) + { + rtx insn; + + for (insn = insns; insn; insn = NEXT_INSN (insn)) + { + rtx last; + + if (GET_RTX_CLASS (GET_CODE (insn)) != 'i') + continue; + + last = try_split (PATTERN (insn), insn, 1); + + if (last != insn) + { + PUT_CODE (insn, NOTE); + NOTE_SOURCE_FILE (insn) = 0; + NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED; + } + } + } + /* Re-create the death notes which were deleted during reload. */ if (optimize) TIMEVAR |