aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-03-21 08:02:21 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-03-21 08:02:21 +0000
commitbe147e848b387d23d421587059e1d45ae17f01d3 (patch)
treeac5969cac9f16efc22521450737be550667ef96f /gcc/cfgexpand.c
parent552b8185be26149ffcc8c879f4644d52aa1c85a8 (diff)
downloadgcc-be147e848b387d23d421587059e1d45ae17f01d3.zip
gcc-be147e848b387d23d421587059e1d45ae17f01d3.tar.gz
gcc-be147e848b387d23d421587059e1d45ae17f01d3.tar.bz2
Makefile.in (cfgexpand.o): Add $(REGS_H) and $(INTEGRATE_H) dependencies.
2012-03-21 Richard Guenther <rguenther@suse.de> * Makefile.in (cfgexpand.o): Add $(REGS_H) and $(INTEGRATE_H) dependencies. * cfgexpand.c (gimple_expand_cfg): Fold in pass_init_function, pass_jump, pass_initial_value_sets and pass_unshare_all_rtl. * passes.c (init_optimization_passes): Remove pass_init_function, pass_jump, pass_initial_value_sets and pass_unshare_all_rtl. * tree-pass.h (pass_init_function): Remove. (pass_jump): Remove. (pass_initial_value_sets): Remove. (pass_unshare_all_rtl): Remove. * integrate.c (pass_initial_value_sets): Remove. * emit-rtl.c (pass_unshare_all_rtl): Remove. * tree.h (init_function_for_compilation): Remove. * function.c (init_function_for_compilation): Remove. (pass_init_function): Remove. * cfgcleanup.c (rest_of_handle_jump): Remove. (pass_jump): Remove. From-SVN: r185598
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 543404a..75d2b16 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -47,6 +47,8 @@ along with GCC; see the file COPYING3. If not see
#include "ssaexpand.h"
#include "bitmap.h"
#include "sbitmap.h"
+#include "regs.h" /* For reg_renumber. */
+#include "integrate.h" /* For emit_initial_value_sets. */
#include "insn-attr.h" /* For INSN_SCHEDULING. */
/* This variable holds information helping the rewriting of SSA trees
@@ -4373,6 +4375,10 @@ gimple_expand_cfg (void)
SA.partition_to_pseudo = (rtx *)xcalloc (SA.map->num_partitions,
sizeof (rtx));
+ /* Make sure all values used by the optimization passes have sane
+ defaults. */
+ reg_renumber = 0;
+
/* Some backends want to know that we are expanding to RTL. */
currently_expanding_to_rtl = 1;
/* Dominators are not kept up-to-date as we may create new basic-blocks. */
@@ -4625,6 +4631,11 @@ gimple_expand_cfg (void)
expand_stack_alignment ();
+ /* Fixup REG_EQUIV notes in the prologue if there are tailcalls in this
+ function. */
+ if (crtl->tail_call_emit)
+ fixup_tail_calls ();
+
/* 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. */
@@ -4643,6 +4654,12 @@ gimple_expand_cfg (void)
verify_flow_info ();
#endif
+ /* Initialize pseudos allocated for hard registers. */
+ emit_initial_value_sets ();
+
+ /* And finally unshare all RTL. */
+ unshare_all_rtl ();
+
/* There's no need to defer outputting this function any more; we
know we want to output it. */
DECL_DEFER_OUTPUT (current_function_decl) = 0;
@@ -4692,7 +4709,9 @@ gimple_expand_cfg (void)
the common parent easily. */
set_block_levels (DECL_INITIAL (cfun->decl), 0);
default_rtl_profile ();
+
timevar_pop (TV_POST_EXPAND);
+
return 0;
}