[LLVMdev] tbaa

Daniel Berlin dberlin at dberlin.org
Mon Dec 5 21:39:22 PST 2011


On Mon, Dec 5, 2011 at 11:08 PM,  <liyi at cs.toronto.edu> wrote:
>> On Dec 5, 2011, at 6:04 PM, Daniel Berlin wrote:
>>>
>>> Yet, aa-eval still says otherwise.
>>
>> The problem is with aa-eval. It collects all the pointer values in a
>> function, and then just makes a bunch of raw pointer queries, rather than
>> considering dereferences. TBAA tags are only attached to dereferences.
>> So TBAA always has to say MayAlias for every aa-eval query.
>>
>> Dan
>>
>>
>
> Hi Dan,
>
> So do you know how to get the correct results from tbaa? It seems
> "print-alias-sets" also has all the pointers in one set.

If you want it to say that float * and int * don't alias, you will
have to enhance clang to generate TBAA tags for pointer types
properly.
It should already say that float * and int don't alias, and int * and
float don't alias.

You can see equivalent hand-written examples in
test/Analysis/TypeBasedAliasAnalysis/



More information about the llvm-dev mailing list