aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2014-10-27 14:01:25 -0700
committerRong Xu <xur@google.com>2014-10-27 14:01:25 -0700
commitab0bb7b89f358e00e28155be52ff96e25947f761 (patch)
tree10aae2ebb082e24e326ca0d1497c3f69666ca0e3 /gcc-4.9
parentc5748954561f492fe1c4ea772e0290079af9960b (diff)
downloadtoolchain_gcc-ab0bb7b89f358e00e28155be52ff96e25947f761.tar.gz
toolchain_gcc-ab0bb7b89f358e00e28155be52ff96e25947f761.tar.bz2
toolchain_gcc-ab0bb7b89f358e00e28155be52ff96e25947f761.zip
[4.9] Fix GCC4.9 segfaults with -fauto-profile and -Os
Backport r216292 from google/gcc-4_9 branch: Move update_ssa after vpt transformation. BUG=17997360 Change-Id: Iae9e15be6ff5655b1514e349c55f05647388df36
Diffstat (limited to 'gcc-4.9')
-rw-r--r--gcc-4.9/gcc/auto-profile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/auto-profile.c b/gcc-4.9/gcc/auto-profile.c
index 11c20164e..c69c1e68c 100644
--- a/gcc-4.9/gcc/auto-profile.c
+++ b/gcc-4.9/gcc/auto-profile.c
@@ -1674,7 +1674,14 @@ afdo_annotate_cfg (const stmt_set &promoted_stmts)
counts_to_freqs ();
}
if (flag_value_profile_transformations)
- gimple_value_profile_transformations ();
+ {
+ gimple_value_profile_transformations ();
+ free_dominance_info (CDI_DOMINATORS);
+ free_dominance_info (CDI_POST_DOMINATORS);
+ calculate_dominance_info (CDI_POST_DOMINATORS);
+ calculate_dominance_info (CDI_DOMINATORS);
+ update_ssa (TODO_update_ssa);
+ }
}
/* Wrapper function to invoke early inliner. */
@@ -1756,7 +1763,6 @@ auto_profile (void)
early_inline ();
autofdo::afdo_annotate_cfg (promoted_stmts);
compute_function_frequency ();
- update_ssa (TODO_update_ssa);
/* Local pure-const may imply need to fixup the cfg. */
if (execute_fixup_cfg () & TODO_cleanup_cfg)