[LLVMdev] BasicAA Tests

Ahmed Bougacha ahmed.bougacha at gmail.com
Thu Feb 5 11:47:31 PST 2015


So it turns out BasicAA doesn't give a useful result for these tests
simply because datalayouts are missing from a bunch of them.  Adding
it enables BasicAA to be more precise for the two tests mentioned, but
also turns MayAlias to PartialAlias in other tests (because IIRC
that's the fallback for GEPs, see the last few lines of aliasGEP).

I vaguely remember a change that made opt not use the host datalayout
anymore, which I guess is why these regressed at some point.

-Ahmed


On Wed, Feb 4, 2015 at 11:23 AM, George Burgess IV
<george.burgess.iv at gmail.com> wrote:
> http://llvm.org/bugs/show_bug.cgi?id=22462
>
> George
>
> On Feb 4, 2015, at 1:52 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>
> ----- Original Message -----
>
> From: "Hal Finkel" <hfinkel at anl.gov>
> To: "George Burgess IV" <george.burgess.iv at gmail.com>
> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Wednesday, February 4, 2015 12:37:14 PM
> Subject: Re: [LLVMdev] BasicAA Tests
>
> [+llvmdev]
>
> Hi George,
>
>
> Also, can you please file a bug report to track these?
>
> -Hal
>
>
> You're right, these tests are broken, and have been for a long time.
> As it turns out, at least in terms of the 2003-12-11-ConstExprGEP.ll
> test, this is related to a case we've been discussing in another
> thread ("Basic AliasAnalysis: Can GEPs with the same base but
> different constant indices into a struct alias?"). It seems like, to
> some extent, we used to have this capability and lost it.
>
> Ahmed, I think you might want to look into this.
>
> -Hal
>
> ----- Original Message -----
>
> From: "George Burgess IV" <george.burgess.iv at gmail.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Sent: Friday, January 30, 2015 10:54:17 AM
> Subject: BasicAA Tests
>
>
> Hey,
>
>
> As I was going through the CFLAA tests, I noticed that some of them
> were passing when they shouldn't have. This was due to that they
> had
> ; CHECK-NOT: May:
>
>
> Which doesn't match up with the output of -print-may-alias:
> MayAlias: %Type %A, %Type2 %B
>
>
> ...So they'd always pass
>
>
> It looks like BasicAA's 2003-12-11-ConstExprGEP.ll and
> 2003-11-04-SimpleCases.ll have a similar pattern, but changing them
> to ; CHECK-NOT: MayAlias:, both tests fail.
>
>
> Attached is a diff to fix the tests, and the output of running opt
> on
> each of the failing cases
>
>
> George
>
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list