aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2015-07-16 15:26:35 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2015-07-16 15:26:35 +0000
commitb81a2f0dbcf13e72503c05420e399d7edf23384b (patch)
tree8007d3add2ae6117cc209d5f0d76980482f23ff8 /gcc/lra-constraints.c
parenta7d1f3fedcddc06f8f4b3d761c928fb5de3a3082 (diff)
downloadgcc-b81a2f0dbcf13e72503c05420e399d7edf23384b.zip
gcc-b81a2f0dbcf13e72503c05420e399d7edf23384b.tar.gz
gcc-b81a2f0dbcf13e72503c05420e399d7edf23384b.tar.bz2
re PR rtl-optimization/66626 (gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3 or -miamcu)
2015-07-16 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/66626 * ira.h (emit-rtl.h): Include. (non_spilled_static_chain_regno_p): New. * ira-color.c (setup_profitable_hard_regs): Clear profitable regs unless it is non spilled static chain pseudo. (assign_hard_rego): Spill memory profitable allocno unless it is non spilled static chain pseudo. (allocno_spill_priority_compare): Put non spilled static chain pseudo at the end of sorted array. (improve_allocation): Do nothing if we have static chain and non-local goto. (allocno__priority_compare_func): Put non spilled static chain pseudo at the beginning of sorted array. (move_spill_restore): Ignore non spilled static chain pseudo. * ira-costs.c (find_costs_and_classes): Don't assign class NO_REGS to non spilled static chain pseudo. * lra-assigns.c (pseudo_compare_func): Put non spilled static chain pseudo at the beginning of sorted array. (spill_for): Spill non spilled static chain pseudo last. * lra-constraints.c (lra_constraints): Remove static chain pseudo check for equivalence. 2015-07-16 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/66626 * gcc.target/i386/pr66626-2.c: New. From-SVN: r225891
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 58a388f..ddb91dd 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -4306,13 +4306,7 @@ lra_constraints (bool first_p)
&& ((CONST_POOL_OK_P (PSEUDO_REGNO_MODE (i), x)
&& (targetm.preferred_reload_class
(x, lra_get_allocno_class (i)) == NO_REGS))
- || contains_symbol_ref_p (x)))
- /* Static chain equivalence may contain eliminable
- regs and the result of elimination might be wrong
- after restoring frame pointer for a nonlocal
- goto. */
- || (cfun->static_chain_decl && crtl->has_nonlocal_goto
- && REG_EXPR (reg) == cfun->static_chain_decl))
+ || contains_symbol_ref_p (x))))
ira_reg_equiv[i].defined_p = false;
if (contains_reg_p (x, false, true))
ira_reg_equiv[i].profitable_p = false;