]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/gimple-predict.h
tree-optimization/93868 copy SLP tree before re-arranging stmts
[gcc.git] / gcc / gimple-predict.h
index ba58e12e9e96aa1c461872d14e63d4b916fc2b58..2d65d598710399d3b657cee5c57000177f778515 100644 (file)
@@ -1,6 +1,6 @@
 /* Gimple prediction routines.
 
-   Copyright (C) 2007-2017 Free Software Foundation, Inc.
+   Copyright (C) 2007-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -26,7 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 /* Return the predictor of GIMPLE_PREDICT statement GS.  */
 
 static inline enum br_predictor
-gimple_predict_predictor (gimple *gs)
+gimple_predict_predictor (const gimple *gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
   return (enum br_predictor) (gs->subcode & ~GF_PREDICT_TAKEN);
@@ -47,7 +47,7 @@ gimple_predict_set_predictor (gimple *gs, enum br_predictor predictor)
 /* Return the outcome of GIMPLE_PREDICT statement GS.  */
 
 static inline enum prediction
-gimple_predict_outcome (gimple *gs)
+gimple_predict_outcome (const gimple *gs)
 {
   GIMPLE_CHECK (gs, GIMPLE_PREDICT);
   return (gs->subcode & GF_PREDICT_TAKEN) ? TAKEN : NOT_TAKEN;
@@ -80,4 +80,12 @@ gimple_build_predict (enum br_predictor predictor, enum prediction outcome)
   return p;
 }
 
+/* Return true if GS is a GIMPLE_PREDICT statement.  */
+
+static inline bool
+is_gimple_predict (const gimple *gs)
+{
+  return gimple_code (gs) == GIMPLE_PREDICT;
+}
+
 #endif  /* GCC_GIMPLE_PREDICT_H */
This page took 0.033197 seconds and 5 git commands to generate.