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 Best regards, Marcus -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090818/020555f3/attachment.html>
On Aug 17, 2009, at 4:16 PM, Marcus Hicks wrote:> I started using the AliasSetTracker, but I have a problem.Hi Marcus, At best, anders-aa is beta-quality. It probably has several bugs and is not really ready to be widely used. -Chris> > 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 > > Best regards, > Marcus > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Tue, Aug 18, 2009 at 7:48 AM, Chris Lattner <clattner at apple.com> wrote:> On Aug 17, 2009, at 4:16 PM, Marcus Hicks wrote: > > I started using the AliasSetTracker, but I have a problem. >> > > Hi Marcus, > > At best, anders-aa is beta-quality. It probably has several bugs and is > not really ready to be widely used. >Thanks, I'll keep that in mind. One thing I notice is that pointers like extern char *p; extern char *q; don't alias with each other. This seems to be a bug, as the code that loops over globals in Andersens does make these point to a universal set, so their points-to should intersect. Eventually I want all these externals to end up in the same AliasSet, and then I need a way to check which alias set includes the universal set. Anyway, I copied Andersens into my project and will try to fix these.> -Chris > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090822/3683579a/attachment.html>
Maybe Matching Threads
- [LLVMdev] AliasSetTracker
- [LLVMdev] What meaning is the argument?
- [LLVMdev] Some questions on the output formats of AliasSetTracker
- [LLVMdev] Some questions on the output formats of AliasSetTracker
- [LLVMdev] AliasSetTracker and UnknownInst's (callsites mostly) problem