This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: TREE_ADDRESSABLE types and SRA?


On Mon, Mar 9, 2009 at 2:21 PM, Martin Jambor <mjambor@suse.cz> wrote:
> Hi,
>
> The description of TREE_ADDRESSABLE macro in tree.h says:
>
> Â"In ..._TYPE nodes, it means that objects of this type must
> Â be fully addressable. ÂThis means that pieces of this
> Â object cannot go into register parameters, for example."
>
> Yet Âthe Âcurrent Âtree-sra Âdoes Ânot check Âthis Âflag Âand Âhappily
> scalarizes Âvariables of Âsuch Âtypes, Âthere are Âeven Âtests in Âour
> regression testsuite that check Âwhether such types are indeed reduced
> (such as g++.dg/tree-ssa/ssa-sra-1.C).
>
> Moreover, such types Âare very common in C++, the Âone in the testcase
> mentioned above is even quite simple.
>
> On a Ârelated note, Âis the assert Âin create_tmp_var() Âchecking this
> addressability the requested type really necessary?

Yes, we really don't want to create a temporary variable of this type
because they need to be constructed and deconstructed.

>
> Is the comment outdated? ÂOr have Âwe been somehow lucky all this time
> while ignoring a sensible requirement?

The comment is semi correct, it is more talking about the type has to
be fully addressable if used fully but really can be scalarised if
used only locally in the function.

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]