[PATCH] D20657: MemorySSA: Fix example in header comment.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Wed May 25 18:17:04 PDT 2016


Lgtm.


On Wed, May 25, 2016, 5:59 PM Peter Collingbourne <peter at pcc.me.uk> wrote:

> pcc created this revision.
> pcc added a reviewer: dberlin.
> pcc added a subscriber: llvm-commits.
>
> This fixes the example so that it matches the pass's behavior. I was a
> little confused by the example until I tried running it and realized that
> there was a mistake.
>
> http://reviews.llvm.org/D20657
>
> Files:
>   include/llvm/Transforms/Utils/MemorySSA.h
>
> Index: include/llvm/Transforms/Utils/MemorySSA.h
> ===================================================================
> --- include/llvm/Transforms/Utils/MemorySSA.h
> +++ include/llvm/Transforms/Utils/MemorySSA.h
> @@ -45,9 +45,9 @@
>  //   store i32 5, i32* %2, align 4
>  //   ; 4 = MemoryDef(3)
>  //   store i32 7, i32* %4, align 4
> -//   ; MemoryUse(4)
> -//   %7 = load i32* %2, align 4
>  //   ; MemoryUse(3)
> +//   %7 = load i32* %2, align 4
> +//   ; MemoryUse(4)
>  //   %8 = load i32* %4, align 4
>  //   %add = add nsw i32 %7, %8
>  //   ret i32 %add
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160526/ca881f3f/attachment.html>


More information about the llvm-commits mailing list