From c8cfe1f62b3678d548e6003f0d077aedb640b339 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 11 Apr 1993 09:24:02 -0400 Subject: [PATCH] (add_to_delay_list): Clear any cached block information for INSN. From-SVN: r4084 --- gcc/reorg.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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. */ -- 2.30.2