diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-05-10 17:31:13 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-05-10 17:31:13 -0700 |
commit | 02cd8797834423ef922e357d2f5437e6f8f44a12 (patch) | |
tree | 2fa0e54b84a7139aa62854fa17e8d6a43fe37dae /gcc/unroll.c | |
parent | 819f43e6c7398bfc19899dc4e670e62e9473b9b6 (diff) | |
download | gcc-02cd8797834423ef922e357d2f5437e6f8f44a12.zip gcc-02cd8797834423ef922e357d2f5437e6f8f44a12.tar.gz gcc-02cd8797834423ef922e357d2f5437e6f8f44a12.tar.bz2 |
(copy_loop_body): Copy REG_NOTES during main loop
instead of afterwards.
From-SVN: r4416
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r-- | gcc/unroll.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c index d93e3ba..2041624 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -1609,7 +1609,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration, pattern = copy_rtx_and_substitute (pattern, map); copy = emit_insn (pattern); } - /* REG_NOTES will be copied later. */ + /* We must copy the REG_NOTES now, because the register mapping + might change later. */ + REG_NOTES (copy) = copy_rtx_and_substitute (REG_NOTES (insn), map); #ifdef HAVE_cc0 /* If this insn is setting CC0, it may need to look at @@ -1653,6 +1655,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration, case JUMP_INSN: pattern = copy_rtx_and_substitute (PATTERN (insn), map); copy = emit_jump_insn (pattern); + /* We must copy the REG_NOTES now, because the register mapping + might change later. */ + REG_NOTES (copy) = copy_rtx_and_substitute (REG_NOTES (insn), map); if (JUMP_LABEL (insn) == start_label && insn == copy_end && ! last_iteration) @@ -1754,6 +1759,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration, case CALL_INSN: pattern = copy_rtx_and_substitute (PATTERN (insn), map); copy = emit_call_insn (pattern); + /* We must copy the REG_NOTES now, because the register mapping + might change later. */ + REG_NOTES (copy) = copy_rtx_and_substitute (REG_NOTES (insn), map); #ifdef HAVE_cc0 if (cc0_insn) @@ -1804,19 +1812,6 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration, } while (insn != copy_end); - /* Now copy the REG_NOTES. */ - insn = copy_start; - do - { - insn = NEXT_INSN (insn); - if ((GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN - || GET_CODE (insn) == CALL_INSN) - && map->insn_map[INSN_UID (insn)]) - REG_NOTES (map->insn_map[INSN_UID (insn)]) - = copy_rtx_and_substitute (REG_NOTES (insn), map); - } - while (insn != copy_end); - /* There may be notes between copy_notes_from and loop_end. Emit a copy of each of these notes here, since there may be some important ones, such as NOTE_INSN_BLOCK_END notes, in this group. We don't do this on the last |