[PATCH] D23076: Support for lifetime begin/end markers in the use optimizer

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 15:11:48 PDT 2016


On Tue, Aug 2, 2016 at 3:02 PM, George Burgess IV <
george.burgess.iv at gmail.com> wrote:

> george.burgess.iv accepted this revision.
> george.burgess.iv added a comment.
> This revision is now accepted and ready to land.
>
> LGTM with nits; thanks!
>
>
> ================
> Comment at: lib/Transforms/Utils/MemorySSA.cpp:180
> @@ +179,3 @@
> +      case Intrinsic::lifetime_end:
> +        {
> +        if (AA.isMustAlias(MemoryLocation(II->getArgOperand(1)), Loc))
> ----------------
> Please kill these brackets
>
> ================
> Comment at: lib/Transforms/Utils/MemorySSA.cpp:181
> @@ +180,3 @@
> +        {
> +        if (AA.isMustAlias(MemoryLocation(II->getArgOperand(1)), Loc))
> +          return true;
> ----------------
> `return AA.isMustAlias(...);`?


This is what i get for copying code. Fixed.


>
> ================
> Comment at: test/Transforms/Util/MemorySSA/lifetime-simple.ll:2
> @@ +1,3 @@
> +; RUN: opt -basicaa -print-memoryssa -verify-memoryssa -analyze < %s 2>&1
> | FileCheck %s
> +; RUN: opt -aa-pipeline=basic-aa
> -passes='print<memoryssa>,verify<memoryssa>' -disable-output < %s 2>&1 |
> FileCheck %s
> +define i8 @test(i8* %P, i8* %Q) {
> ----------------
> Please add a newline after this line
>
> ================
> Comment at: test/Transforms/Util/MemorySSA/lifetime-simple.ll:10
> @@ +9,3 @@
> +  call void @llvm.lifetime.start(i64 32, i8* %P)
> +; CHECK-DAG:  MemoryUse(liveOnEntry)
> +  %0 = load i8, i8* %P
> ----------------
> Is there a reason these aren't vanilla CHECKs?
>

I was trying to get it to order them without having to use CHECK-NEXT, but
re-reading, it won't work.

I'll go back to the CHECK-NEXT style.




> (If not, please also add the `; CHECK-NEXT: %0 = load ...` after each
> check for MemoryDef/MemoryUse, for consistency with the other tests)
>



>
>
> https://reviews.llvm.org/D23076
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160802/c2abd926/attachment.html>


More information about the llvm-commits mailing list