diff options
author | Richard Guenther <rguenther@suse.de> | 2012-08-08 14:51:26 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-08-08 14:51:26 +0000 |
commit | a471762f68f0315df2d3c772596c45f38f45fb7c (patch) | |
tree | 5689352c68b543e180bc74d7d78ab9b7cbf2ccb6 /gcc/tree-ssa-operands.c | |
parent | aa5d8db01989776315c05c52343b609d01dcc43a (diff) | |
download | gcc-a471762f68f0315df2d3c772596c45f38f45fb7c.zip gcc-a471762f68f0315df2d3c772596c45f38f45fb7c.tar.gz gcc-a471762f68f0315df2d3c772596c45f38f45fb7c.tar.bz2 |
tree-ssa-operands.h (virtual_operand_p): Declare.
2012-08-08 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.h (virtual_operand_p): Declare.
* tree-ssa-operands.c (virtual_operand_p): New predicate.
* gimple.c (is_gimple_reg): Use virtual_operand_p.
* tree-into-ssa.c (prepare_block_for_update): Likewise.
* tree-vect-loop-manip.c (adjust_debug_stmts): Likewise.
From-SVN: r190231
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index cbadfd9..67e6f93 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -1421,6 +1421,24 @@ debug_immediate_uses_for (tree var) } +/* Return true if OP, an SSA name or a DECL is a virtual operand. */ + +bool +virtual_operand_p (tree op) +{ + if (TREE_CODE (op) == SSA_NAME) + { + op = SSA_NAME_VAR (op); + if (!op) + return false; + } + + if (TREE_CODE (op) == VAR_DECL) + return VAR_DECL_IS_VIRTUAL_OPERAND (op); + + return false; +} + /* Unlink STMTs virtual definition from the IL by propagating its use. */ void |