summaryrefslogtreecommitdiff
path: root/gcc/reload1.c
diff options
context:
space:
mode:
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-17 02:18:24 +0000
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-17 02:18:24 +0000
commitfd7a154df349ff34ac9d96db9f143844ba04d19e (patch)
tree691aeafddb0a87acbd9aac366c7ea95648cda6d0 /gcc/reload1.c
parentf5945047d04c5006a37fa100b8e41153b84cb762 (diff)
downloadgcc-fd7a154df349ff34ac9d96db9f143844ba04d19e.tar.gz
PR rtl-optimization/48542
* reload.c (find_equiv_reg): Stop looking when finding a setjmp-type call. * reload1.c (reload_as_needed): Invalidate all reload registers when crossing a setjmp-type call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175132 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reload1.c')
-rw-r--r--gcc/reload1.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/reload1.c b/gcc/reload1.c
index e65503b9fa5..a87e6ad08d6 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -4844,6 +4844,13 @@ reload_as_needed (int live_known)
{
AND_COMPL_HARD_REG_SET (reg_reloaded_valid, call_used_reg_set);
AND_COMPL_HARD_REG_SET (reg_reloaded_valid, reg_reloaded_call_part_clobbered);
+
+ /* If this is a call to a setjmp-type function, we must not
+ reuse any reload reg contents across the call; that will
+ just be clobbered by other uses of the register in later
+ code, before the longjmp. */
+ if (find_reg_note (insn, REG_SETJMP, NULL_RTX))
+ CLEAR_HARD_REG_SET (reg_reloaded_valid);
}
}