aboutsummaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2007-03-23 23:05:28 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2007-03-23 23:05:28 +0000
commitda732a8520daa587c1c4c6e06006a74b87379cdb (patch)
treea15eb2e5e903aed64b074a1be1be2b4bb4d71136 /gcc/reg-stack.c
parent1cbeaf868267ce5e0333477e067fc800a4593d09 (diff)
* tracer.c (tracer): Don't take FLAGS argument. Assert we are
in cfglayout mode. Don't go into and out of cfglayout mode. Link the blocks in the order of the constructed traces. (rest_of_handle_tracer): Adjust call to tracer. * loop-init.c (rtl_loop_init): Assert we are in cfglayout mode. Don't go into cfglayout mode. (rtl_loop_done): Don't go out of cfglayout mode. * cfglayout.c (relink_block_chain): New function, split out from... (fixup_reorder_chain): ...here. Remove redundant checking. (cfg_layout_finalize): Don't clear the header, footer, and aux fields here, move the code to do so to relink_block_chain. Likewise for free_original_copy_tables. * rtl.h (tracer): Update prototype. * bb-reorder.c (reorder_basic_blocks): Don't take FLAGS argument. Assert we are in cfglayout mode. Don't go into and out of cfglayout mode. Use relink_block_chain to serialize the CFG according to the new basic block order. Move targetm.cannot_modify_jumps_p check from here... (gate_handle_reorder_blocks): ...to here. (duplicate_computed_gotos): Move targetm.cannot_modify_jumps_p check from here... (gate_duplicate_computed_gotos): ...to here. (rest_of_handle_reorder_blocks): Don't see if anything has changed, something always changes when going into and out of cfglayout mode. Perform an expensive cfg cleanup while going into cfglayout mode. Always update liveness information on HAVE_conditional_execution targets. Reserialize the basic blocks and go out of cfglayout mode. * reg-stack.c: Include cfglayout.h. (rest_of_handle_stack_regs): Go into and out of cfglayout mode around the call to reorder_basic_blocks. * basic-block.h (reorder_basic_blocks): Update prototype. (relink_block_chain): New prototype. * passes.c (pass_outof_cfg_layout_mode): Move after cse2. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@123167 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 0103a2f0475..0cc3629858f 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -167,6 +167,7 @@
#include "recog.h"
#include "output.h"
#include "basic-block.h"
+#include "cfglayout.h"
#include "varray.h"
#include "reload.h"
#include "ggc.h"
@@ -3197,8 +3198,17 @@ rest_of_handle_stack_regs (void)
| (flag_crossjumping ? CLEANUP_CROSSJUMP : 0))
&& (flag_reorder_blocks || flag_reorder_blocks_and_partition))
{
- reorder_basic_blocks (0);
- cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK);
+ basic_block bb;
+
+ cfg_layout_initialize (0);
+
+ reorder_basic_blocks ();
+ cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK);
+
+ FOR_EACH_BB (bb)
+ if (bb->next_bb != EXIT_BLOCK_PTR)
+ bb->aux = bb->next_bb;
+ cfg_layout_finalize ();
}
}
else