re PR rtl-optimization/42617 (TARGET_MEM_REF and plain INDIRECT_REFs are not handled by the RTL oracle)
2010-04-07 Richard Guenther <rguenther@suse.de> PR middle-end/42617 * expr.c (expand_expr_real_1): For TARGET_MEM_REFs with pointer bases build simple mem attributes to retain points-to information. From-SVN: r158048
This commit is contained in:
parent
6addabbbe8
commit
83a416b095
@ -1,3 +1,10 @@
|
||||
2010-04-07 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/42617
|
||||
* expr.c (expand_expr_real_1): For TARGET_MEM_REFs with
|
||||
pointer bases build simple mem attributes to retain
|
||||
points-to information.
|
||||
|
||||
2010-04-07 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/42617
|
||||
|
11
gcc/expr.c
11
gcc/expr.c
@ -8730,6 +8730,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
||||
{
|
||||
addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (exp));
|
||||
struct mem_address addr;
|
||||
tree base;
|
||||
|
||||
get_address_description (exp, &addr);
|
||||
op0 = addr_for_mem_ref (&addr, as, true);
|
||||
@ -8737,6 +8738,16 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
||||
temp = gen_rtx_MEM (mode, op0);
|
||||
set_mem_attributes (temp, TMR_ORIGINAL (exp), 0);
|
||||
set_mem_addr_space (temp, as);
|
||||
base = get_base_address (TMR_ORIGINAL (exp));
|
||||
if (INDIRECT_REF_P (base)
|
||||
&& TMR_BASE (exp)
|
||||
&& TREE_CODE (TMR_BASE (exp)) == SSA_NAME
|
||||
&& POINTER_TYPE_P (TREE_TYPE (TMR_BASE (exp))))
|
||||
{
|
||||
set_mem_expr (temp, build1 (INDIRECT_REF,
|
||||
TREE_TYPE (exp), TMR_BASE (exp)));
|
||||
set_mem_offset (temp, NULL_RTX);
|
||||
}
|
||||
}
|
||||
return temp;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user