aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-03-20 09:52:02 +0000
committerRichard Guenther <rguenther@suse.de>2012-03-20 09:52:02 +0000
commitc5b867a0c6535a24c98a68c701de5a096803385e (patch)
treee89d5a5556905f0b4ea59f1b8aefd4dafbaed5bb /gcc/cfgexpand.c
parentfc40f5a770b6612726b94171ce888fda9ebdc9d8 (diff)
2012-03-20 Richard Guenther <rguenther@suse.de>
* tree-pass.h (pass_rtl_eh): Remove. * except.c (gate_handle_eh): Likewise. (rest_of_handle_eh): Likewise. (pass_rtl_eh): Likewise. (finish_eh_generation): Export. * except.h (finish_eh_generation): Declare. * passes.c (init_optimization_passes): Remove pass_rtl_eh. * cfgexpand.c (gimple_expand_cfg): Call finish_eh_generation after expanding stack alignment. Instead of compacting blocks call cleanup_cfg. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@185564 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index bd21169eb87..543404a70d3 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -4623,10 +4623,22 @@ gimple_expand_cfg (void)
sbitmap_free (blocks);
purge_all_dead_edges ();
- compact_blocks ();
-
expand_stack_alignment ();
+ /* After initial rtl generation, call back to finish generating
+ exception support code. We need to do this before cleaning up
+ the CFG as the code does not expect dead landing pads. */
+ if (cfun->eh->region_tree != NULL)
+ finish_eh_generation ();
+
+ /* Remove unreachable blocks, otherwise we cannot compute dominators
+ which are needed for loop state verification. As a side-effect
+ this also compacts blocks.
+ ??? We cannot remove trivially dead insns here as for example
+ the DRAP reg on i?86 is not magically live at this point.
+ gcc.c-torture/execute/ipa-sra-2.c execution, -Os -m32 fails otherwise. */
+ cleanup_cfg (CLEANUP_NO_INSN_DEL);
+
#ifdef ENABLE_CHECKING
verify_flow_info ();
#endif