bb-reorder.c (fixup_reorder_chain): Don't look up new block again.

* bb-reorder.c (fixup_reorder_chain): Don't look up new block again.
        (reorder_basic_blocks): If no epilogue in rtl, force last block last.

From-SVN: r33221
This commit is contained in:
Richard Henderson 2000-04-17 18:32:43 -07:00
parent 009e98457a
commit d1bfc5ad46
2 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2000-04-17 Richard Henderson <rth@cygnus.com>
* bb-reorder.c (fixup_reorder_chain): Don't look up new block again.
(reorder_basic_blocks): If no epilogue in rtl, force last block last.
2000-04-17 Mark Mitchell <mark@codesourcery.com> 2000-04-17 Mark Mitchell <mark@codesourcery.com>
* function.c (expand_function_start): Use hard_function_value to * function.c (expand_function_start): Use hard_function_value to
@ -123,7 +128,7 @@ Mon Apr 17 14:59:36 MET DST 2000 Jan Hubicka <jh@suse.cz>
(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Remove page check, (ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Remove page check,
since vector in in the data CSECT. since vector in in the data CSECT.
(ASM_OUTPUT_REG_POP, ASM_OUTPUT_REG_PUSH): Restore to correct operation. (ASM_OUTPUT_REG_POP, ASM_OUTPUT_REG_PUSH): Restore to correct operation.
* i370.md (Many patterns): Put the length in the XL directives. * i370.md (Many patterns): Put the length in the XL directives.
(movdi): Put back STM and MVC in definition. (movdi): Put back STM and MVC in definition.
(floatsidf2): Correct TARGET_ELF_ABI pattern and add back the LE370 (floatsidf2): Correct TARGET_ELF_ABI pattern and add back the LE370
pattern using the TCA. pattern using the TCA.

View File

@ -690,8 +690,7 @@ fixup_reorder_chain ()
BASIC_BLOCK (nb->index)->local_set = 0; BASIC_BLOCK (nb->index)->local_set = 0;
nb->aux = xcalloc (1, sizeof (struct reorder_block_def)); nb->aux = xcalloc (1, sizeof (struct reorder_block_def));
REORDER_BLOCK_INDEX (BASIC_BLOCK (n_basic_blocks - 1)) REORDER_BLOCK_INDEX (nb) = REORDER_BLOCK_INDEX (bbi) + 1;
= REORDER_BLOCK_INDEX (bbi) + 1;
/* Relink to new block. */ /* Relink to new block. */
nb->succ = bbi->succ; nb->succ = bbi->succ;
nb->succ->src = nb; nb->succ->src = nb;
@ -835,6 +834,22 @@ reorder_basic_blocks ()
REORDER_BLOCK_EFF_HEAD (bbi) = NEXT_INSN (prev_eff_end); REORDER_BLOCK_EFF_HEAD (bbi) = NEXT_INSN (prev_eff_end);
} }
} }
/* If we've not got epilogue in RTL, we must fallthru to the exit.
Force the last block to be at the end. */
/* ??? Some ABIs (e.g. MIPS) require the return insn to be at the
end of the function for stack unwinding purposes. */
#ifndef HAVE_epilogue
#define HAVE_epilogue 0
#endif
if (! HAVE_epilogue)
{
basic_block last = BASIC_BLOCK (n_basic_blocks - 1);
REORDER_BLOCK_INDEX (last) = n_basic_blocks - 1;
REORDER_BLOCK_FLAGS (last) |= REORDER_BLOCK_VISITED;
}
make_reorder_chain (BASIC_BLOCK (0)); make_reorder_chain (BASIC_BLOCK (0));