diff options
Diffstat (limited to 'gcc/gimple-match-head.c')
-rw-r--r-- | gcc/gimple-match-head.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c index c7b2f957bac..dc13218b2bf 100644 --- a/gcc/gimple-match-head.c +++ b/gcc/gimple-match-head.c @@ -861,3 +861,21 @@ do_valueize (tree (*valueize)(tree), tree op) return op; } +/* Routine to determine if the types T1 and T2 are effectively + the same for GIMPLE. */ + +inline bool +types_match (tree t1, tree t2) +{ + return types_compatible_p (t1, t2); +} + +/* Return if T has a single use. For GIMPLE, we also allow any + non-SSA_NAME (ie constants) and zero uses to cope with uses + that aren't linked up yet. */ + +inline bool +single_use (tree t) +{ + return TREE_CODE (t) != SSA_NAME || has_zero_uses (t) || has_single_use (t); +} |