diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-12-12 23:03:54 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-12-12 16:03:54 -0700 |
commit | 941c63ac30be855420bc79b702355594712cff90 (patch) | |
tree | 8cb9f662656a67c7745f1ade226aa8d33838a4e0 /gcc/global.c | |
parent | 8d4c79be50f79381b6306600b304ea3182a8d63c (diff) | |
download | gcc-941c63ac30be855420bc79b702355594712cff90.zip gcc-941c63ac30be855420bc79b702355594712cff90.tar.gz gcc-941c63ac30be855420bc79b702355594712cff90.tar.bz2 |
rtlanal.c (multiple_sets): New function.
* rtlanal.c (multiple_sets): New function.
* rtl.h (multiple_sets): Declare it.
* local-alloc.c (wipe_dead_reg): Use it.
* global.c (global_conflicts): Likewise.
Should fix the m68k bootstrap problems.
From-SVN: r24283
Diffstat (limited to 'gcc/global.c')
-rw-r--r-- | gcc/global.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/global.c b/gcc/global.c index 6720172..06277ee 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -739,9 +739,16 @@ global_conflicts () /* If INSN has multiple outputs, then any reg that dies here and is used inside of an output - must conflict with the other outputs. */ - - if (GET_CODE (PATTERN (insn)) == PARALLEL && !single_set (insn)) + must conflict with the other outputs. + + It is unsafe to use !single_set here since it will ignore an + unused output. Just because an output is unused does not mean + the compiler can assume the side effect will not occur. + Consider if REG appears in the address of an output and we + reload the output. If we allocate REG to the same hard + register as an unused output we could set the hard register + before the output reload insn. */ + if (GET_CODE (PATTERN (insn)) == PARALLEL && multiple_sets (insn)) for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) if (REG_NOTE_KIND (link) == REG_DEAD) { |