summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/tree-ssa-ccp.c5
3 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f36b2b898bc..12105febf46 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2008-05-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR tree-optimization/36129
+ * tree-ssa-cpp.c: Include value-prof.h.
+ (execute_fold_all_builtins): Call gimple_remove_stmt_histograms if
+ built-in function was folded to a constant.
+ * Makefile.in (tree-ssa-cpp.c): Depend on value-prof.h
+
2008-05-09 Jan Sjodin <jan.sjodin@amd.com>
Sebastian Pop <sebastian.pop@amd.com>
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 2e3da2cd361..992937aff40 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2592,7 +2592,7 @@ tree-ssa-ccp.o : tree-ssa-ccp.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(RTL_H) $(TREE_H) $(TM_P_H) $(EXPR_H) $(GGC_H) output.h \
$(DIAGNOSTIC_H) $(FUNCTION_H) $(TIMEVAR_H) $(TM_H) coretypes.h \
$(TREE_DUMP_H) $(BASIC_BLOCK_H) tree-pass.h langhooks.h \
- tree-ssa-propagate.h $(FLAGS_H) $(TARGET_H) toplev.h
+ tree-ssa-propagate.h value-prof.h $(FLAGS_H) $(TARGET_H) toplev.h
tree-sra.o : tree-sra.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) \
$(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) $(TREE_INLINE_H) \
$(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) $(TREE_GIMPLE_H) \
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index c6c7a8885f5..455af4c4863 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -204,6 +204,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-flow.h"
#include "tree-pass.h"
#include "tree-ssa-propagate.h"
+#include "value-prof.h"
#include "langhooks.h"
#include "target.h"
#include "toplev.h"
@@ -2885,6 +2886,10 @@ execute_fold_all_builtins (void)
fcode = DECL_FUNCTION_CODE (callee);
result = ccp_fold_builtin (*stmtp, call);
+
+ if (result)
+ gimple_remove_stmt_histograms (cfun, *stmtp);
+
if (!result)
switch (DECL_FUNCTION_CODE (callee))
{