aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/gimple-expr.c
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
committerBen Cheng <bccheng@google.com>2014-04-22 13:33:12 -0700
commite3cc64dec20832769406aa38cde83c7dd4194bf4 (patch)
treeef8e39be37cfe0cb69d850043b7924389ff17164 /gcc-4.9/gcc/gimple-expr.c
parentf33c7b3122b1d7950efa88067c9a156229ba647b (diff)
downloadtoolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.gz
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.tar.bz2
toolchain_gcc-e3cc64dec20832769406aa38cde83c7dd4194bf4.zip
[4.9] GCC 4.9.0 official release refresh
Change-Id: Ic99a7da8b44b789a48aeec93b33e93944d6e6767
Diffstat (limited to 'gcc-4.9/gcc/gimple-expr.c')
-rw-r--r--gcc-4.9/gcc/gimple-expr.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/gimple-expr.c b/gcc-4.9/gcc/gimple-expr.c
index 2c4da474e..da663d6fb 100644
--- a/gcc-4.9/gcc/gimple-expr.c
+++ b/gcc-4.9/gcc/gimple-expr.c
@@ -527,6 +527,24 @@ create_tmp_reg (tree type, const char *prefix)
return tmp;
}
+/* Create a new temporary variable declaration of type TYPE by calling
+ create_tmp_var and if TYPE is a vector or a complex number, mark the new
+ temporary as gimple register. */
+
+tree
+create_tmp_reg_fn (struct function *fn, tree type, const char *prefix)
+{
+ tree tmp;
+
+ tmp = create_tmp_var_raw (type, prefix);
+ gimple_add_tmp_var_fn (fn, tmp);
+ if (TREE_CODE (type) == COMPLEX_TYPE
+ || TREE_CODE (type) == VECTOR_TYPE)
+ DECL_GIMPLE_REG_P (tmp) = 1;
+
+ return tmp;
+}
+
/* ----- Expression related ----- */