summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-13 10:04:09 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-13 10:04:09 +0000
commit93ff53d3fe85b302fc6099f14066a533af57eeac (patch)
treeb1ba97001acf76353646714998e7e1ece2891d68 /gcc/emit-rtl.c
parent611b669db6f7647330ebacaf3696f14599a6f1d9 (diff)
downloadgcc-93ff53d3fe85b302fc6099f14066a533af57eeac.tar.gz
* emit-rtl.c (remove_insn): Do not call df_insn_delete here.
* cfgrtl.c (delete_insn): Call it here instead. * lra-spills.c (lra_final_code_change): Use delete_insn. * haifa-sched.c (sched_remove_insn): Likewise. * sel-sched-ir.c (return_nop_to_pool): Clear INSN_DELETED_P for nops returning to the nop pool. (sel_remove_insn): Simplify the only_disconnect case via remove_insn, use delete_insn for definitive removal. Clear BLOCK_FOR_INSN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 73a59b58046..82e476683ca 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -3908,8 +3908,21 @@ set_insn_deleted (rtx insn)
}
-/* Remove an insn from its doubly-linked list. This function knows how
- to handle sequences. */
+/* Unlink INSN from the insn chain.
+
+ This function knows how to handle sequences.
+
+ This function does not invalidate data flow information associated with
+ INSN (i.e. does not call df_insn_delete). That makes this function
+ usable for only disconnecting an insn from the chain, and re-emit it
+ elsewhere later.
+
+ To later insert INSN elsewhere in the insn chain via add_insn and
+ similar functions, PREV_INSN and NEXT_INSN must be nullified by
+ the caller. Nullifying them here breaks many insn chain walks.
+
+ To really delete an insn and related DF information, use delete_insn. */
+
void
remove_insn (rtx insn)
{
@@ -3968,10 +3981,6 @@ remove_insn (rtx insn)
gcc_assert (stack);
}
- /* Invalidate data flow information associated with INSN. */
- if (INSN_P (insn))
- df_insn_delete (insn);
-
/* Fix up basic block boundaries, if necessary. */
if (!BARRIER_P (insn)
&& (bb = BLOCK_FOR_INSN (insn)))