Re: [patch] Do not directly change TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr

2017-06-16 Thread Richard Biener
On Fri, Jun 16, 2017 at 12:26 PM, Eric Botcazou wrote: >> I don't think so. get_address_description assumes TMR_BASE is in >> canonical form, >> that is, when it is an ADDR_EXPR we have a symbol and when not we have >> a pointer. >> TMR[&p->a] violates this and the gimple-fold.c part first canoni

Re: [patch] Do not directly change TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr

2017-06-16 Thread Eric Botcazou
> I don't think so. get_address_description assumes TMR_BASE is in > canonical form, > that is, when it is an ADDR_EXPR we have a symbol and when not we have > a pointer. > TMR[&p->a] violates this and the gimple-fold.c part first canonicalizes this > to TMR[p + offsetof(a)]. get_address_descript

Re: [patch] Do not directly change TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr

2017-06-16 Thread Richard Biener
On Thu, Jun 15, 2017 at 3:51 PM, Eric Botcazou wrote: > Hi, > > the transformation done to TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr > is exactly the same as one of those done in maybe_fold_tmr, the latter is > better written and the former function calls the latter, so this patch changes

[patch] Do not directly change TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr

2017-06-15 Thread Eric Botcazou
Hi, the transformation done to TARGET_MEM_REF in maybe_canonicalize_mem_ref_addr is exactly the same as one of those done in maybe_fold_tmr, the latter is better written and the former function calls the latter, so this patch changes maybe_canonicalize_mem_ref_addr to avoid touching TARGET_MEM_