mirror of git://gcc.gnu.org/git/gcc.git
tree.h (copy_mem_ref_info): Delete.
* tree.h (copy_mem_ref_info): Delete. * tree-ssa-address.c (copy_mem_ref_info): Likewise. (maybe_fold_tmr): Copy flags manually. * tree-ssa-loop-im.c (simple_mem_ref_in_stmt): Rewrite. From-SVN: r191924
This commit is contained in:
parent
ba9144840f
commit
1fc1ef37ec
|
|
@ -1,3 +1,10 @@
|
||||||
|
2012-10-01 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
|
* tree.h (copy_mem_ref_info): Delete.
|
||||||
|
* tree-ssa-address.c (copy_mem_ref_info): Likewise.
|
||||||
|
(maybe_fold_tmr): Copy flags manually.
|
||||||
|
* tree-ssa-loop-im.c (simple_mem_ref_in_stmt): Rewrite.
|
||||||
|
|
||||||
2012-10-01 Marc Glisse <marc.glisse@inria.fr>
|
2012-10-01 Marc Glisse <marc.glisse@inria.fr>
|
||||||
|
|
||||||
* simplify-rtx.c (simplify_binary_operation_1) <VEC_SELECT>:
|
* simplify-rtx.c (simplify_binary_operation_1) <VEC_SELECT>:
|
||||||
|
|
|
||||||
|
|
@ -821,16 +821,6 @@ get_address_description (tree op, struct mem_address *addr)
|
||||||
addr->offset = TMR_OFFSET (op);
|
addr->offset = TMR_OFFSET (op);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copies the additional information attached to target_mem_ref FROM to TO. */
|
|
||||||
|
|
||||||
void
|
|
||||||
copy_mem_ref_info (tree to, tree from)
|
|
||||||
{
|
|
||||||
/* And the info about the original reference. */
|
|
||||||
TREE_SIDE_EFFECTS (to) = TREE_SIDE_EFFECTS (from);
|
|
||||||
TREE_THIS_VOLATILE (to) = TREE_THIS_VOLATILE (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Copies the reference information from OLD_REF to NEW_REF, where
|
/* Copies the reference information from OLD_REF to NEW_REF, where
|
||||||
NEW_REF should be either a MEM_REF or a TARGET_MEM_REF. */
|
NEW_REF should be either a MEM_REF or a TARGET_MEM_REF. */
|
||||||
|
|
||||||
|
|
@ -901,7 +891,7 @@ maybe_fold_tmr (tree ref)
|
||||||
{
|
{
|
||||||
struct mem_address addr;
|
struct mem_address addr;
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
tree ret, off;
|
tree new_ref, off;
|
||||||
|
|
||||||
get_address_description (ref, &addr);
|
get_address_description (ref, &addr);
|
||||||
|
|
||||||
|
|
@ -962,10 +952,11 @@ maybe_fold_tmr (tree ref)
|
||||||
ended up folding it, always create a new TARGET_MEM_REF regardless
|
ended up folding it, always create a new TARGET_MEM_REF regardless
|
||||||
if it is valid in this for on the target - the propagation result
|
if it is valid in this for on the target - the propagation result
|
||||||
wouldn't be anyway. */
|
wouldn't be anyway. */
|
||||||
ret = create_mem_ref_raw (TREE_TYPE (ref),
|
new_ref = create_mem_ref_raw (TREE_TYPE (ref),
|
||||||
TREE_TYPE (addr.offset), &addr, false);
|
TREE_TYPE (addr.offset), &addr, false);
|
||||||
copy_mem_ref_info (ret, ref);
|
TREE_SIDE_EFFECTS (new_ref) = TREE_SIDE_EFFECTS (ref);
|
||||||
return ret;
|
TREE_THIS_VOLATILE (new_ref) = TREE_THIS_VOLATILE (ref);
|
||||||
|
return new_ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dump PARTS to FILE. */
|
/* Dump PARTS to FILE. */
|
||||||
|
|
|
||||||
|
|
@ -638,29 +638,22 @@ outermost_indep_loop (struct loop *outer, struct loop *loop, mem_ref_p ref)
|
||||||
static tree *
|
static tree *
|
||||||
simple_mem_ref_in_stmt (gimple stmt, bool *is_store)
|
simple_mem_ref_in_stmt (gimple stmt, bool *is_store)
|
||||||
{
|
{
|
||||||
tree *lhs;
|
tree *lhs, *rhs;
|
||||||
enum tree_code code;
|
|
||||||
|
|
||||||
/* Recognize MEM = (SSA_NAME | invariant) and SSA_NAME = MEM patterns. */
|
/* Recognize SSA_NAME = MEM and MEM = (SSA_NAME | invariant) patterns. */
|
||||||
if (gimple_code (stmt) != GIMPLE_ASSIGN)
|
if (!gimple_assign_single_p (stmt))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
code = gimple_assign_rhs_code (stmt);
|
|
||||||
|
|
||||||
lhs = gimple_assign_lhs_ptr (stmt);
|
lhs = gimple_assign_lhs_ptr (stmt);
|
||||||
|
rhs = gimple_assign_rhs1_ptr (stmt);
|
||||||
|
|
||||||
if (TREE_CODE (*lhs) == SSA_NAME)
|
if (TREE_CODE (*lhs) == SSA_NAME && gimple_vuse (stmt))
|
||||||
{
|
{
|
||||||
if (get_gimple_rhs_class (code) != GIMPLE_SINGLE_RHS
|
|
||||||
|| !is_gimple_addressable (gimple_assign_rhs1 (stmt)))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
*is_store = false;
|
*is_store = false;
|
||||||
return gimple_assign_rhs1_ptr (stmt);
|
return rhs;
|
||||||
}
|
}
|
||||||
else if (code == SSA_NAME
|
else if (gimple_vdef (stmt)
|
||||||
|| (get_gimple_rhs_class (code) == GIMPLE_SINGLE_RHS
|
&& (TREE_CODE (*rhs) == SSA_NAME || is_gimple_min_invariant (*rhs)))
|
||||||
&& is_gimple_min_invariant (gimple_assign_rhs1 (stmt))))
|
|
||||||
{
|
{
|
||||||
*is_store = true;
|
*is_store = true;
|
||||||
return lhs;
|
return lhs;
|
||||||
|
|
|
||||||
|
|
@ -6266,7 +6266,6 @@ tree target_for_debug_bind (tree);
|
||||||
|
|
||||||
/* In tree-ssa-address.c. */
|
/* In tree-ssa-address.c. */
|
||||||
extern tree tree_mem_ref_addr (tree, tree);
|
extern tree tree_mem_ref_addr (tree, tree);
|
||||||
extern void copy_mem_ref_info (tree, tree);
|
|
||||||
extern void copy_ref_info (tree, tree);
|
extern void copy_ref_info (tree, tree);
|
||||||
|
|
||||||
/* In tree-vrp.c */
|
/* In tree-vrp.c */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue