summaryrefslogtreecommitdiff
path: root/gcc/sel-sched-ir.c
diff options
context:
space:
mode:
authoramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-25 10:05:00 +0000
committeramonakov <amonakov@138bc75d-0d04-0410-961f-82ee72b054a4>2010-11-25 10:05:00 +0000
commitbc9cb5ed7a22640a34172f02d3af5199d83102d9 (patch)
tree1c3f871216986df312c309d8e8c8af7acfa667b4 /gcc/sel-sched-ir.c
parent7af466ad78bc5c559ad0eb518d32a75ed4a54408 (diff)
downloadgcc-bc9cb5ed7a22640a34172f02d3af5199d83102d9.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167141 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r--gcc/sel-sched-ir.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 231358bc145..7956cd8f682 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -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);