I started using the AliasSetTracker, but I have a problem.
I am using -basicaa -anders-aa and optimizations are enabled for llvm-gcc and llvm-ld.
I use an instruction visitor to populate the alias set tracker, but two pointers end up in different alias sets.
While investigating this I notice at one point that if I call:
bool New = false;
AliasSet &X = AST->getAliasSetForPointer(Pointer, Size, &New);
After this call, New is true
but AST->containsPointer(Pointer, Size) is false! Shouldn’t it be true at this point?
If I call again getAliasSetForPointer after resetting New, it remains false, as I expect it after the first call.
But AST->getAliasSetForPointerIfExists(Pointer, Size) returns null. Again, shouldn’t it return the same alias set as the first call?
Am I misunderstanding something? This seems to work without optimizations or without -anders-aa.
Using revision 79271