[patch] split FRAME variables back into pieces

Eric Botcazou ebotcazou@adacore.com
Thu Sep 20 11:20:00 GMT 2012


> I really don't like this to be done outside of SRA (and it is written in a
> non-MEM_REF way).

Could you elaborate on the latter point?  If it can be improved, even in its 
current form...

> For the testcase in question we scalarize back
> 'i' in SRA (other scalars are optimized away already, but as SRA runs
> before DSE it still gets to see stores to FRAME.i).  Now I wonder
> why we generate reasonable debug info even without inlining,
> thus there has to be a association to the original decls with
> the frame FIELD_DECLs.  That is, lookup_decl_for_field should not be
> necessary and what we use for debug info generation should be used by SRA
> to assign a name to scalarized fields.

The testcase is a toy example of course.

> That alone would not solve your issue because of the 'arr' field in
> the structure which cannot be scalarized (moved to a stand-alone
> decl) by SRA.  That's one missed feature of SRA though, and generally
> useful.

The improved scalarization of aggregates is the main point and what yielded 
the performance boost for SPARKSkein.

> So no, I don't think this patch is the right approach.

OK, but I came to the opposite conclusion when I first tried to do it in SRA 
and I don't think I will change my mind in the near future.  Never mind then.

-- 
Eric Botcazou



More information about the Gcc-patches mailing list