This is the mail archive of the gcc-patches@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: PATCH RFA: PR 29286: Handle placement new aliasing issues


On 6/10/07, Eric Botcazou <ebotcazou@adacore.com> wrote:
> It actually causes us to decide that all call clobbered variables and
> tags are part of the alias set, as well as a million other things.
> This may not be what it  *has to do*, but that's what it does right now.
> If you want to try using it here, try using it and see what kind of
> performance you get.
>
> Most of the time, the type being used in placement new is the same
> type they cast back to.  It does not "ref-all".  It is much more of a
> union operation between the aliasing of the type being passed to
> placement new, and the aliasing of the type the object ends up being
> casted to, such that it's not illegal to access the former through the
> latter anymore.  Claiming it legally references *all* types is just
> wrong.

OK, I misinterpreted Ian's description then, specifically "marks the resulting
pointer so as to not apply TBAA".  So the patch causes a weaker form of TBAA
to be applied to it instead?
We could do this, though we currently don't.
But we do nothing to add call clobbered variables or tags, only the
things it would otherwise reference if not for TBAA (which is not the
same set).



> (BTW, given the choice between TYPE_REF_CAN_ALIAS_ALL, and something > actually written in our IL, i'll take something in our IL anyway :P)

NIH syndrome. ;-)

Not really.
One is an easy to express, and temporary thing that lives only to tell
alias analysis some information once.  Another is a bit checked
everywhere that has to be preserved everywhere, and makes what would
look like an "ordinary" pointer reference, special, meaning everyone
has to go looking for it.


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