re PR tree-optimization/36129 (ICE with -fprofile-use)
authorUros Bizjak <ubizjak@gmail.com>
Fri, 9 May 2008 18:21:05 +0000 (20:21 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 9 May 2008 18:21:05 +0000 (20:21 +0200)
        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
gcc/Makefile.in
gcc/tree-ssa-ccp.c

index f36b2b898bcc6097327cecd0b8b18d4c53a82cc6..12105febf46770d7041de6d23554fae56e80e4e1 100644 (file)
@@ -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>
 
index 2e3da2cd3611c71a07adfc1c66d370305afda71a..992937aff40468efe551d2ca36f9836e2f8e3202 100644 (file)
@@ -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) \
index c6c7a8885f506a88c0aee8626101b05a453af673..455af4c4863acff05cf3258c405b086452a045d2 100644 (file)
@@ -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))
              {