OSDN Git Service

PR tree-optimization/36129
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 May 2008 18:21:05 +0000 (18:21 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 May 2008 18:21:05 +0000 (18:21 +0000)
        * 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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135123 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/Makefile.in
gcc/tree-ssa-ccp.c

index f36b2b8..12105fe 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 2e3da2c..992937a 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 c6c7a88..455af4c 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))
              {