From: Richard Kenner Date: Sun, 11 Apr 1993 13:24:02 +0000 (-0400) Subject: (add_to_delay_list): Clear any cached block information for INSN. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c8cfe1f62b3678d548e6003f0d077aedb640b339;p=gcc.git (add_to_delay_list): Clear any cached block information for INSN. From-SVN: r4084 --- diff --git a/gcc/reorg.c b/gcc/reorg.c index 83bbddae66c..47526fc9cff 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -879,9 +879,24 @@ add_to_delay_list (insn, delay_list) rtx insn; rtx delay_list; { - /* If we have an empty list, just make a new list element. */ + /* If we have an empty list, just make a new list element. If + INSN has it's block number recorded, clear it since we may + be moving the insn to a new block. */ + if (delay_list == 0) - return gen_rtx (INSN_LIST, VOIDmode, insn, NULL_RTX); + { + struct target_info *tinfo; + + for (tinfo = target_hash_table[INSN_UID (insn) % TARGET_HASH_PRIME]; + tinfo; tinfo = tinfo->next) + if (tinfo->uid == INSN_UID (insn)) + break; + + if (tinfo) + tinfo->block = -1; + + return gen_rtx (INSN_LIST, VOIDmode, insn, NULL_RTX); + } /* Otherwise this must be an INSN_LIST. Add INSN to the end of the list. */