Commit 947ca6a0 by Richard Biener Committed by Richard Biener

gimplify.c (create_tmp_from_val): Remove is_formal parameter and set…

gimplify.c (create_tmp_from_val): Remove is_formal parameter and set DECL_GIMPLE_REG_P unconditionally if appropriate.

2014-06-05  Richard Biener  <rguenther@suse.de>

	* gimplify.c (create_tmp_from_val): Remove is_formal parameter
	and set DECL_GIMPLE_REG_P unconditionally if appropriate.
	(lookup_tmp_var): Adjust.
	(prepare_gimple_addressable): Unset DECL_GIMPLE_REG_P here.

From-SVN: r211262
parent 8ffcdea8
2014-06-05 Richard Biener <rguenther@suse.de>
* gimplify.c (create_tmp_from_val): Remove is_formal parameter
and set DECL_GIMPLE_REG_P unconditionally if appropriate.
(lookup_tmp_var): Adjust.
(prepare_gimple_addressable): Unset DECL_GIMPLE_REG_P here.
2014-06-05 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> 2014-06-05 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/arm/arm.md (enabled): Disable opt_enabled attribute. * config/arm/arm.md (enabled): Disable opt_enabled attribute.
......
...@@ -451,14 +451,13 @@ is_gimple_mem_rhs_or_call (tree t) ...@@ -451,14 +451,13 @@ is_gimple_mem_rhs_or_call (tree t)
lookup_tmp_var; nobody else should call this function. */ lookup_tmp_var; nobody else should call this function. */
static inline tree static inline tree
create_tmp_from_val (tree val, bool is_formal) create_tmp_from_val (tree val)
{ {
/* Drop all qualifiers and address-space information from the value type. */ /* Drop all qualifiers and address-space information from the value type. */
tree type = TYPE_MAIN_VARIANT (TREE_TYPE (val)); tree type = TYPE_MAIN_VARIANT (TREE_TYPE (val));
tree var = create_tmp_var (type, get_name (val)); tree var = create_tmp_var (type, get_name (val));
if (is_formal if (TREE_CODE (TREE_TYPE (var)) == COMPLEX_TYPE
&& (TREE_CODE (TREE_TYPE (var)) == COMPLEX_TYPE || TREE_CODE (TREE_TYPE (var)) == VECTOR_TYPE)
|| TREE_CODE (TREE_TYPE (var)) == VECTOR_TYPE))
DECL_GIMPLE_REG_P (var) = 1; DECL_GIMPLE_REG_P (var) = 1;
return var; return var;
} }
...@@ -477,7 +476,7 @@ lookup_tmp_var (tree val, bool is_formal) ...@@ -477,7 +476,7 @@ lookup_tmp_var (tree val, bool is_formal)
work in reload and final and poorer code generation, outweighing work in reload and final and poorer code generation, outweighing
the extra memory allocation here. */ the extra memory allocation here. */
if (!optimize || !is_formal || TREE_SIDE_EFFECTS (val)) if (!optimize || !is_formal || TREE_SIDE_EFFECTS (val))
ret = create_tmp_from_val (val, is_formal); ret = create_tmp_from_val (val);
else else
{ {
elt_t elt, *elt_p; elt_t elt, *elt_p;
...@@ -491,7 +490,7 @@ lookup_tmp_var (tree val, bool is_formal) ...@@ -491,7 +490,7 @@ lookup_tmp_var (tree val, bool is_formal)
{ {
elt_p = XNEW (elt_t); elt_p = XNEW (elt_t);
elt_p->val = val; elt_p->val = val;
elt_p->temp = ret = create_tmp_from_val (val, is_formal); elt_p->temp = ret = create_tmp_from_val (val);
*slot = elt_p; *slot = elt_p;
} }
else else
...@@ -3154,7 +3153,11 @@ prepare_gimple_addressable (tree *expr_p, gimple_seq *seq_p) ...@@ -3154,7 +3153,11 @@ prepare_gimple_addressable (tree *expr_p, gimple_seq *seq_p)
while (handled_component_p (*expr_p)) while (handled_component_p (*expr_p))
expr_p = &TREE_OPERAND (*expr_p, 0); expr_p = &TREE_OPERAND (*expr_p, 0);
if (is_gimple_reg (*expr_p)) if (is_gimple_reg (*expr_p))
*expr_p = get_initialized_tmp_var (*expr_p, seq_p, NULL); {
tree var = get_initialized_tmp_var (*expr_p, seq_p, NULL);
DECL_GIMPLE_REG_P (var) = 0;
*expr_p = var;
}
} }
/* A subroutine of gimplify_modify_expr. Replace a MODIFY_EXPR with /* A subroutine of gimplify_modify_expr. Replace a MODIFY_EXPR with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment