aboutsummaryrefslogtreecommitdiff
path: root/gcc/lra-constraints.c
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2018-12-04 22:50:14 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>2018-12-04 22:50:14 +0000
commit037586dddab4e2ce5821a52fd0344286e4fee86c (patch)
tree34307fd3859f01393925b3b48c9b66c519187f63 /gcc/lra-constraints.c
parent7b377b221075723021fafc1a2942a1dc15cf5953 (diff)
downloadgcc-037586dddab4e2ce5821a52fd0344286e4fee86c.zip
gcc-037586dddab4e2ce5821a52fd0344286e4fee86c.tar.gz
gcc-037586dddab4e2ce5821a52fd0344286e4fee86c.tar.bz2
re PR rtl-optimization/88317 (ICE: Segmentation fault (in split_reg -> bitmap_set_bit -> bitmap_list_link_element))
2018-12-04 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/88317 * lra-constraints.c (split_reg): Don't set up check_only_regs if we are outside the inheritance pass. From-SVN: r266803
Diffstat (limited to 'gcc/lra-constraints.c')
-rw-r--r--gcc/lra-constraints.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 04a9072..09bd7aa 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -5496,7 +5496,9 @@ lra_copy_reg_equiv (unsigned int new_regno, unsigned int original_regno)
ORIGINAL_REGNO. NEXT_USAGE_INSNS specifies which instruction in
the EBB next uses ORIGINAL_REGNO; it has the same form as the
"insns" field of usage_insns. If TO is not NULL, we don't use
- usage_insns, we put restore insns after TO insn.
+ usage_insns, we put restore insns after TO insn. It is a case when
+ we call it from lra_split_hard_reg_for, outside the inheritance
+ pass.
The transformations look like:
@@ -5652,16 +5654,18 @@ split_reg (bool before_p, int original_regno, rtx_insn *insn,
&& mode == PSEUDO_REGNO_MODE (original_regno))
lra_copy_reg_equiv (new_regno, original_regno);
lra_reg_info[new_regno].restore_rtx = regno_reg_rtx[original_regno];
- bitmap_set_bit (&check_only_regs, new_regno);
- bitmap_set_bit (&check_only_regs, original_regno);
bitmap_set_bit (&lra_split_regs, new_regno);
if (to != NULL)
{
+ lra_assert (next_usage_insns == NULL);
usage_insn = to;
after_p = TRUE;
}
else
{
+ /* We need check_only_regs only inside the inheritance pass. */
+ bitmap_set_bit (&check_only_regs, new_regno);
+ bitmap_set_bit (&check_only_regs, original_regno);
after_p = usage_insns[original_regno].after_p;
for (;;)
{