Re: [PATCH 6/6] Make SRA replace constant-pool loads

2015-11-16 Thread Richard Biener
On Thu, Nov 12, 2015 at 7:35 PM, Alan Lawrence wrote: > On 06/11/15 16:29, Richard Biener wrote: 2) You should be able to use fold_ctor_reference directly (in place >>> of all your code in case offset and size are readily available - don't remember >>>

Re: [PATCH 6/6] Make SRA replace constant-pool loads

2015-11-12 Thread Alan Lawrence
On 06/11/15 16:29, Richard Biener wrote: >>> 2) You should be able to use fold_ctor_reference directly (in place >> of >>> all your code >>> in case offset and size are readily available - don't remember >> exactly how >>> complete scalarization "walks" elements). Alternatively use >>>

Re: [PATCH 6/6] Make SRA replace constant-pool loads

2015-11-06 Thread Eric Botcazou
> Hmm, can you clarify, do you mean I should *not* replace constant pool > values with their DECL_INITIAL? The attempt to substitute in the > initial value is what leads to most of the problems. For example, in > gnat/opt31.adb, create_access finds this expression accessing *.LC0: > >

Re: [PATCH 6/6] Make SRA replace constant-pool loads

2015-11-06 Thread Richard Biener
On November 5, 2015 7:55:12 PM GMT+01:00, Alan Lawrence wrote: >On 3 November 2015 at 14:01, Richard Biener > wrote: >> >> Hum. I still wonder why we need all this complication ... > >Well, certainly I'd love to make it simpler, and if the

Re: [PATCH 6/6] Make SRA replace constant-pool loads

2015-11-05 Thread Alan Lawrence
On 3 November 2015 at 14:01, Richard Biener wrote: > > Hum. I still wonder why we need all this complication ... Well, certainly I'd love to make it simpler, and if the complication is because I've gone about trying to deal with especially Ada in the wrong way... >

Re: [PATCH 6/6] Make SRA replace constant-pool loads

2015-11-03 Thread Richard Biener
On Thu, Oct 29, 2015 at 8:18 PM, Alan Lawrence wrote: > This has changed quite a bit since the previous revision > (https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01484.html), mostly due to Ada > and specifically Ada on ARM. > > I didn't find a good alternative to scanning

Re: [PATCH 6/6] Make SRA replace constant-pool loads

2015-10-31 Thread Bernhard Reutner-Fischer
On October 29, 2015 8:18:22 PM GMT+01:00, Alan Lawrence wrote: >+ >+static tree >+subst_constant_pool_initial (tree expr, tree var) >+{ >+ if (TREE_CODE (expr) == VAR_DECL) Just a nit, but i thought we had VAR_DECL_P or VAR_P for the TREE_CODE (NODE) == VAR_DECL

[PATCH 6/6] Make SRA replace constant-pool loads

2015-10-29 Thread Alan Lawrence
This has changed quite a bit since the previous revision (https://gcc.gnu.org/ml/gcc-patches/2015-08/msg01484.html), mostly due to Ada and specifically Ada on ARM. I didn't find a good alternative to scanning for constant-pool accesses "as we go" through the function, and although I didn't find