diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-04 11:52:35 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-04 11:52:35 +0000 |
commit | 98107def4d92f0f02d34c53e5971c5e68176815a (patch) | |
tree | 5d195f2c96f8f418bd1d795709474cd7c6d0007d /gcc/gimple-expr.c | |
parent | 23913915572ebc3bee410dc2b1115199865f179e (diff) | |
download | gcc-98107def4d92f0f02d34c53e5971c5e68176815a.tar.gz |
2014-04-04 Richard Biener <rguenther@suse.de>
PR ipa/60746
* tree-ssanames.c (make_ssa_name_fn): Fix assert.
* gimple.c (gimple_set_bb): Avoid ICEing for NULL cfun for
non-GIMPLE_LABELs.
* gimplify.h (gimple_add_tmp_var_fn): Declare.
* gimplify.c (gimple_add_tmp_var_fn): New function.
* gimple-expr.h (create_tmp_reg_fn): Declare.
* gimple-expr.c (create_tmp_reg_fn): New function.
* gimple-low.c (record_vars_into): Don't change cfun.
* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Fix
code generation without cfun.
* g++.dg/torture/pr60746.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-expr.c')
-rw-r--r-- | gcc/gimple-expr.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c index 2c4da474eff..da663d6fb79 100644 --- a/gcc/gimple-expr.c +++ b/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 ----- */ |