diff options
author | Jan Hubicka <jh@suse.cz> | 2001-06-20 19:12:34 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2001-06-20 17:12:34 +0000 |
commit | 097c2d51de5728480afd2a42ae0f4a8d65e889a1 (patch) | |
tree | f871551d415687bda294bcc76a1b30f179fc6c8d | |
parent | 861f9cd090ca5799b4c1f2926c157ec0f313d529 (diff) | |
download | gcc-097c2d51de5728480afd2a42ae0f4a8d65e889a1.zip gcc-097c2d51de5728480afd2a42ae0f4a8d65e889a1.tar.gz gcc-097c2d51de5728480afd2a42ae0f4a8d65e889a1.tar.bz2 |
toplev.c (rest_of_compilation): Run mark_constant_function before profile-arcs.
* toplev.c (rest_of_compilation): Run mark_constant_function
before profile-arcs.
From-SVN: r43477
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/toplev.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d258e10..4370b43 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 20 19:10:48 CEST 2001 Jan Hubicka <jh@suse.cz> + + * toplev.c (rest_of_compilation): Run mark_constant_function + before profile-arcs. + Wed Jun 20 19:08:18 CEST 2001 Jan Hubicka <jh@suse.cz> * predict.c (estimate_loops_at_level, propagate_freq diff --git a/gcc/toplev.c b/gcc/toplev.c index 7272d0c..eb6ec52 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3258,6 +3258,15 @@ rest_of_compilation (decl) cleanup_cfg (); check_function_return_warnings (); + /* It may make more sense to mark constant functions after dead code is + eliminated by life_analyzis, but we need to do it early, as -fprofile-arcs + may insert code making function non-constant, but we still must consider + it as constant, otherwise -fbranch-probabilities will not read data back. + + life_analyzis rarely eliminates modification of external memory. + */ + mark_constant_function (); + close_dump_file (DFI_cfg, print_rtl_with_bb, insns); if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities) @@ -3290,7 +3299,6 @@ rest_of_compilation (decl) flow_loops_free (&loops); } life_analysis (insns, rtl_dump_file, PROP_FINAL); - mark_constant_function (); timevar_pop (TV_FLOW); register_life_up_to_date = 1; |