From 53a8f709904821fffda9897a9c197af9465a626e Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 9 May 2008 20:21:05 +0200 Subject: [PATCH] re PR tree-optimization/36129 (ICE with -fprofile-use) 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 From-SVN: r135123 --- gcc/ChangeLog | 8 ++++++++ gcc/Makefile.in | 2 +- gcc/tree-ssa-ccp.c | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) 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 + + 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 Sebastian Pop 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)) { -- 2.30.2