aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 7f1240f..c7aaa81 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -91,6 +91,7 @@ enum gf_mask {
GF_CALL_ALLOCA_FOR_VAR = 1 << 5,
GF_CALL_INTERNAL = 1 << 6,
GF_CALL_CTRL_ALTERING = 1 << 7,
+ GF_CALL_WITH_BOUNDS = 1 << 8,
GF_OMP_PARALLEL_COMBINED = 1 << 0,
GF_OMP_FOR_KIND_MASK = 7 << 0,
GF_OMP_FOR_KIND_FOR = 0,
@@ -2453,6 +2454,31 @@ gimple_call_internal_p (const_gimple gs)
}
+/* Return true if call GS is marked as instrumented by
+ Pointer Bounds Checker. */
+
+static inline bool
+gimple_call_with_bounds_p (const_gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ return (gs->subcode & GF_CALL_WITH_BOUNDS) != 0;
+}
+
+
+/* If INSTRUMENTED_P is true, marm statement GS as instrumented by
+ Pointer Bounds Checker. */
+
+static inline void
+gimple_call_set_with_bounds (gimple gs, bool with_bounds)
+{
+ GIMPLE_CHECK (gs, GIMPLE_CALL);
+ if (with_bounds)
+ gs->subcode |= GF_CALL_WITH_BOUNDS;
+ else
+ gs->subcode &= ~GF_CALL_WITH_BOUNDS;
+}
+
+
/* Return the target of internal call GS. */
static inline enum internal_fn
@@ -5555,6 +5581,26 @@ gimple_return_set_retval (gimple gs, tree retval)
}
+/* Return the return bounds for GIMPLE_RETURN GS. */
+
+static inline tree
+gimple_return_retbnd (const_gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_RETURN);
+ return gimple_op (gs, 1);
+}
+
+
+/* Set RETVAL to be the return bounds for GIMPLE_RETURN GS. */
+
+static inline void
+gimple_return_set_retbnd (gimple gs, tree retval)
+{
+ GIMPLE_CHECK (gs, GIMPLE_RETURN);
+ gimple_set_op (gs, 1, retval);
+}
+
+
/* Returns true when the gimple statement STMT is any of the OpenMP types. */
#define CASE_GIMPLE_OMP \