[PATCH] Fix for bug 21725: wrong results with union and strict-aliasing

Jeroen Dobbelaere jeroen.dobbelaere at gmail.com
Tue Mar 17 15:41:28 PDT 2015


On Tue, Mar 17, 2015 at 10:24 PM, Daniel Berlin <dberlin at dberlin.org> wrote:

> [..]
>


> Note that In !41, we loose the information about the 'short' member.
>
>>
>> I would start here :)
>
>
You should make it produce info about all the members.
>
Sounds reasonable.


>
>
>>
>> [..]
>>
>
>> One issue with getting array accesses right that I see, is that the
>> 'offset' field can suddenly be variable.
>>
>>
> Not really. You can't say where it points, so the range would be
> "everything" anyway.
> You should just say it accesses the entire array (but not anything else).
>
>
In order to provide as detailed and accurate feedback as possible, my
current changes to the tbaa analysis
take the (location) access size into account. This is because the tbaa path
information itself does not
contain direct size information, only offsets.

Is there today already a way how such variable array access can be
described ? Is there a way to describe that we have an array of a certain
type/size in the tbaa struct ?
Just looking at containment of types gives some information and will in
certain cases fix incorrect behavior, but it will also result in
performance degradation (due to more 'MayAliases') if offsets can not be
taken into account in the way they are used today.

Greetings,

Jeroen Dobbelaere
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150317/0b5a43ef/attachment.html>


More information about the cfe-commits mailing list