diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-02 17:49:32 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-02 17:49:32 +0000 |
commit | f09f132bf38987009051ac7c8489dc36b5d4e1b8 (patch) | |
tree | 63b674cab8c718bf17708549a9c54440fbe71c18 /gcc/gimple.c | |
parent | 35bdd6604bf525d533683b7b4e0096e0a70bcd66 (diff) | |
download | ppe42-gcc-f09f132bf38987009051ac7c8489dc36b5d4e1b8.tar.gz ppe42-gcc-f09f132bf38987009051ac7c8489dc36b5d4e1b8.zip |
2009-05-02 Richard Guenther <rguenther@suse.de>
PR middle-end/40001
* tree-ssa.c (execute_update_addresses_taken): Properly check
if we can mark a variable DECL_GIMPLE_REG_P.
* gimple.c (is_gimple_reg): Re-order check for DECL_GIMPLE_REG_P
back to the end of the function.
(is_gimple_reg_type): Remove complex type special casing.
* gimplify.c (gimplify_bind_expr): Do not set DECL_GIMPLE_REG_P
if not optimizing.
* gcc.target/spu/pr40001.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147064 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index db7f872b5cc..6ea1470df57 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2805,13 +2805,7 @@ is_gimple_id (tree t) bool is_gimple_reg_type (tree type) { - /* In addition to aggregate types, we also exclude complex types if not - optimizing because they can be subject to partial stores in GNU C by - means of the __real__ and __imag__ operators and we cannot promote - them to total stores (see gimplify_modify_expr_complex_part). */ - return !(AGGREGATE_TYPE_P (type) - || (TREE_CODE (type) == COMPLEX_TYPE && !optimize)); - + return !AGGREGATE_TYPE_P (type); } /* Return true if T is a non-aggregate register variable. */ @@ -2825,12 +2819,6 @@ is_gimple_reg (tree t) if (!is_gimple_variable (t)) return false; - /* Complex and vector values must have been put into SSA-like form. - That is, no assignments to the individual components. */ - if (TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE - || TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) - return DECL_GIMPLE_REG_P (t); - if (!is_gimple_reg_type (TREE_TYPE (t))) return false; @@ -2857,6 +2845,12 @@ is_gimple_reg (tree t) if (TREE_CODE (t) == VAR_DECL && DECL_HARD_REGISTER (t)) return false; + /* Complex and vector values must have been put into SSA-like form. + That is, no assignments to the individual components. */ + if (TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE + || TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) + return DECL_GIMPLE_REG_P (t); + return true; } |