summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2008-05-09 20:21:05 +0200
committerUros Bizjak <uros@gcc.gnu.org>2008-05-09 20:21:05 +0200
commit53a8f709904821fffda9897a9c197af9465a626e (patch)
tree9abb9ad33d19979379a5f9a1ae5f9beeb8670e1f /gcc/tree-ssa-ccp.c
parent3f227a8c1cdcb43cb39acc748b8e1e7a3ad0b628 (diff)
downloadgcc-53a8f709904821fffda9897a9c197af9465a626e.tar.gz
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
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c5
1 files changed, 5 insertions, 0 deletions
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))
{