diff options
author | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-16 21:30:48 +0000 |
---|---|---|
committer | dalej <dalej@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-16 21:30:48 +0000 |
commit | 116b27263e77cbfe998a7209311d9f1ac16d1f77 (patch) | |
tree | 9dc94762e4e333bd5c5638f294288dacdb30980e /gcc/combine.c | |
parent | bea5f2d611e121e07cec95812fe10db2f80bb927 (diff) | |
download | gcc-116b27263e77cbfe998a7209311d9f1ac16d1f77.tar.gz |
Reenable combination of hard regs unless CLASS_LIKELY_SPILLED_P.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53531 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 10587fda84e..aaf1bcf3e26 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1459,10 +1459,10 @@ cant_combine_insn_p (insn) if (! INSN_P (insn)) return 1; - /* Never combine loads and stores involving hard regs. The register - allocator can usually handle such reg-reg moves by tying. If we allow - the combiner to make substitutions of hard regs, we risk aborting in - reload on machines that have SMALL_REGISTER_CLASSES. + /* Never combine loads and stores involving hard regs that are likely + to be spilled. The register allocator can usually handle such + reg-reg moves by tying. If we allow the combiner to make + substitutions of likely-spilled regs, we may abort in reload. As an exception, we allow combinations involving fixed regs; these are not available to the register allocator so there's no risk involved. */ @@ -1477,9 +1477,11 @@ cant_combine_insn_p (insn) dest = SUBREG_REG (dest); if (REG_P (src) && REG_P (dest) && ((REGNO (src) < FIRST_PSEUDO_REGISTER - && ! fixed_regs[REGNO (src)]) + && ! fixed_regs[REGNO (src)] + && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (REGNO (src)))) || (REGNO (dest) < FIRST_PSEUDO_REGISTER - && ! fixed_regs[REGNO (dest)]))) + && ! fixed_regs[REGNO (dest)] + && CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (REGNO (dest)))))) return 1; return 0; |