diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2013-04-13 10:04:09 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2013-04-13 10:04:09 +0000 |
commit | 1f397f45b3db18687d9445e6e3895f34f09daa38 (patch) | |
tree | b1ba97001acf76353646714998e7e1ece2891d68 /gcc/emit-rtl.c | |
parent | 0e50ab072aab4f319bf0d50f6fe559b28bb3ae97 (diff) | |
download | gcc-1f397f45b3db18687d9445e6e3895f34f09daa38.zip gcc-1f397f45b3db18687d9445e6e3895f34f09daa38.tar.gz gcc-1f397f45b3db18687d9445e6e3895f34f09daa38.tar.bz2 |
emit-rtl.c (remove_insn): Do not call df_insn_delete here.
* 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.
From-SVN: r197942
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 73a59b5..82e4766 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))) |