diff options
Diffstat (limited to 'gcc/tree-scalar-evolution.h')
-rw-r--r-- | gcc/tree-scalar-evolution.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-scalar-evolution.h b/gcc/tree-scalar-evolution.h index ad3ddd5..98855b9 100644 --- a/gcc/tree-scalar-evolution.h +++ b/gcc/tree-scalar-evolution.h @@ -36,4 +36,12 @@ unsigned int scev_const_prop (void); extern bool simple_iv (struct loop *, tree, tree, affine_iv *, bool); +/* Returns the loop of the polynomial chrec CHREC. */ + +static inline struct loop * +get_chrec_loop (tree chrec) +{ + return get_loop (CHREC_VARIABLE (chrec)); +} + #endif /* GCC_TREE_SCALAR_EVOLUTION_H */ |