Commit d1bfc5ad by Richard Henderson

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
parent 009e9845
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>
* function.c (expand_function_start): Use hard_function_value to
......
......@@ -690,8 +690,7 @@ fixup_reorder_chain ()
BASIC_BLOCK (nb->index)->local_set = 0;
nb->aux = xcalloc (1, sizeof (struct reorder_block_def));
REORDER_BLOCK_INDEX (BASIC_BLOCK (n_basic_blocks - 1))
= REORDER_BLOCK_INDEX (bbi) + 1;
REORDER_BLOCK_INDEX (nb) = REORDER_BLOCK_INDEX (bbi) + 1;
/* Relink to new block. */
nb->succ = bbi->succ;
nb->succ->src = nb;
......@@ -836,6 +835,22 @@ reorder_basic_blocks ()
}
}
/* 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));
fixup_reorder_chain ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment