aboutsummaryrefslogtreecommitdiff
path: root/gcc/final.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-06-07 17:10:58 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-06-07 15:10:58 +0000
commitd7e5d7feae8162262948978355a6a1c8aebb9b9d (patch)
tree5711fd02bcbda756226623b9aba91fcf6b11ba33 /gcc/final.c
parentf9b23f0c9c6cf618fda3a6f3a3ba819a24c2f571 (diff)
downloadgcc-d7e5d7feae8162262948978355a6a1c8aebb9b9d.zip
gcc-d7e5d7feae8162262948978355a6a1c8aebb9b9d.tar.gz
gcc-d7e5d7feae8162262948978355a6a1c8aebb9b9d.tar.bz2
toplev.c (rest_of_compilation): Revert previous patch.
* toplev.c (rest_of_compilation): Revert previous patch. * final.c (shorten_branches): Likewise. From-SVN: r42961
Diffstat (limited to 'gcc/final.c')
-rw-r--r--gcc/final.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c
index a3fe70d..7b36b1b 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -960,6 +960,26 @@ shorten_branches (first)
int uid;
rtx align_tab[MAX_CODE_ALIGN];
+ /* In order to make sure that all instructions have valid length info,
+ we must split them before we compute the address/length info. */
+
+ for (insn = NEXT_INSN (first); insn; insn = NEXT_INSN (insn))
+ if (INSN_P (insn))
+ {
+ rtx old = insn;
+ /* Don't split the insn if it has been deleted. */
+ if (! INSN_DELETED_P (old))
+ insn = try_split (PATTERN (old), old, 1);
+ /* When not optimizing, the old insn will be still left around
+ with only the 'deleted' bit set. Transform it into a note
+ to avoid confusion of subsequent processing. */
+ if (INSN_DELETED_P (old))
+ {
+ PUT_CODE (old, NOTE);
+ NOTE_LINE_NUMBER (old) = NOTE_INSN_DELETED;
+ NOTE_SOURCE_FILE (old) = 0;
+ }
+ }
#endif
/* We must do some computations even when not actually shortening, in