aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-09-25 12:05:09 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-09-25 10:05:09 +0000
commit70f3cc30aa04ab2f57f156c16a7f1db33084f04e (patch)
tree7e0fabeafbba7b2dbafffbeed8cf36595efdeef3 /gcc/passes.c
parent20319d321a0add192498083daefc7d0cc7cb90a2 (diff)
downloadgcc-70f3cc30aa04ab2f57f156c16a7f1db33084f04e.zip
gcc-70f3cc30aa04ab2f57f156c16a7f1db33084f04e.tar.gz
gcc-70f3cc30aa04ab2f57f156c16a7f1db33084f04e.tar.bz2
passes.c (rest_of_handle_cfg): Disable const/pure function detection when doing tree based profiling.
* passes.c (rest_of_handle_cfg): Disable const/pure function detection when doing tree based profiling. * tree-inline.c (expand_call_inline): Fix incorrectly reversed conditional. From-SVN: r88092
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index c62f2e9..5488981 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -880,8 +880,15 @@ rest_of_handle_cfg (void)
it as constant, otherwise -fbranch-probabilities will not read data back.
life_analysis rarely eliminates modification of external memory.
- */
- if (optimize)
+
+ FIXME: now with tree based profiling we are in the trap described above
+ again. It seems to be easiest to disable the optimization for time
+ being before the problem is either solved by moving the transformation
+ to the IPA level (we need the CFG for this) or the very early optimization
+ passes are made to ignore the const/pure flags so code does not change. */
+ if (optimize
+ && (!flag_tree_based_profiling
+ || (!profile_arc_flag && !flag_branch_probabilities)))
{
/* Alias analysis depends on this information and mark_constant_function
depends on alias analysis. */