re PR rtl-optimization/46585 (ICE: SIGSEGV in vinsn_create (sel-sched-ir.c:1189) with -fno-dce -fschedule-insns -fselective-scheduling)
PR rtl-optimization/46585 * sel-sched-ir.c (return_regset_to_pool): Verify that RS is not NULL. (vinsn_init): Skip initialization of dependencies for local NOPs. (vinsn_delete): Don't try to free regsets for local NOPs. (setup_nop_and_exit_insns): Change definition of nop_pattern. testsuite: * gcc.dg/pr46585.c: New. From-SVN: r167141
This commit is contained in:
parent
d787f788f8
commit
9ef1bf719b
4 changed files with 35 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
2010-11-25 Alexander Monakov <amonakov@ispras.ru>
|
||||
|
||||
PR rtl-optimization/46585
|
||||
* sel-sched-ir.c (return_regset_to_pool): Verify that RS is not NULL.
|
||||
(vinsn_init): Skip computation of dependencies for local NOPs.
|
||||
(vinsn_delete): Don't try to free regsets for local NOPs.
|
||||
(setup_nop_and_exit_insns): Change definition of nop_pattern.
|
||||
|
||||
2010-11-25 Alexander Monakov <amonakov@ispras.ru>
|
||||
|
||||
PR rtl-optimization/46602
|
||||
|
|
|
@ -942,6 +942,7 @@ get_clear_regset_from_pool (void)
|
|||
void
|
||||
return_regset_to_pool (regset rs)
|
||||
{
|
||||
gcc_assert (rs);
|
||||
regset_pool.diff--;
|
||||
|
||||
if (regset_pool.n == regset_pool.s)
|
||||
|
@ -1175,6 +1176,9 @@ vinsn_init (vinsn_t vi, insn_t insn, bool force_unique_p)
|
|||
VINSN_COUNT (vi) = 0;
|
||||
vi->cost = -1;
|
||||
|
||||
if (INSN_NOP_P (insn))
|
||||
return;
|
||||
|
||||
if (DF_INSN_UID_SAFE_GET (INSN_UID (insn)) != NULL)
|
||||
init_id_from_df (VINSN_ID (vi), insn, force_unique_p);
|
||||
else
|
||||
|
@ -1256,9 +1260,12 @@ vinsn_delete (vinsn_t vi)
|
|||
{
|
||||
gcc_assert (VINSN_COUNT (vi) == 0);
|
||||
|
||||
return_regset_to_pool (VINSN_REG_SETS (vi));
|
||||
return_regset_to_pool (VINSN_REG_USES (vi));
|
||||
return_regset_to_pool (VINSN_REG_CLOBBERS (vi));
|
||||
if (!INSN_NOP_P (VINSN_INSN_RTX (vi)))
|
||||
{
|
||||
return_regset_to_pool (VINSN_REG_SETS (vi));
|
||||
return_regset_to_pool (VINSN_REG_USES (vi));
|
||||
return_regset_to_pool (VINSN_REG_CLOBBERS (vi));
|
||||
}
|
||||
|
||||
free (vi);
|
||||
}
|
||||
|
@ -5607,7 +5614,7 @@ setup_nop_and_exit_insns (void)
|
|||
gcc_assert (nop_pattern == NULL_RTX
|
||||
&& exit_insn == NULL_RTX);
|
||||
|
||||
nop_pattern = gen_nop ();
|
||||
nop_pattern = constm1_rtx;
|
||||
|
||||
start_sequence ();
|
||||
emit_insn (nop_pattern);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-11-25 Alexander Monakov <amonakov@ispras.ru>
|
||||
|
||||
PR rtl-optimization/46585
|
||||
* gcc.dg/pr46585.c: New.
|
||||
|
||||
2010-11-24 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* lib/target-supports.exp (vect_widen_sum_hi_to_si_pattern,
|
||||
|
|
11
gcc/testsuite/gcc.dg/pr46585.c
Normal file
11
gcc/testsuite/gcc.dg/pr46585.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
|
||||
/* { dg-options "-fno-dce -fschedule-insns -fselective-scheduling" } */
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
switch (0)
|
||||
{
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue