aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-gimple.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-gimple.c')
-rw-r--r--gcc/tree-gimple.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-gimple.c b/gcc/tree-gimple.c
index 2a62aeb..284f577 100644
--- a/gcc/tree-gimple.c
+++ b/gcc/tree-gimple.c
@@ -268,6 +268,8 @@ is_gimple_reg_type (tree type)
bool
is_gimple_reg (tree t)
{
+ var_ann_t ann;
+
if (TREE_CODE (t) == SSA_NAME)
t = SSA_NAME_VAR (t);
@@ -305,9 +307,16 @@ is_gimple_reg (tree t)
if (TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE)
return DECL_COMPLEX_GIMPLE_REG_P (t);
+ /* Some compiler temporaries are created to be used exclusively in
+ virtual operands (currently memory tags and sub-variables).
+ These variables should never be considered GIMPLE registers. */
+ if (DECL_ARTIFICIAL (t) && (ann = var_ann (t)) != NULL)
+ return ann->mem_tag_kind == NOT_A_TAG;
+
return true;
}
+
/* Returns true if T is a GIMPLE formal temporary variable. */
bool