[PATCH] D38569: Expose must/may alias info in MemorySSA.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 7 14:27:31 PST 2018


asbirlea added inline comments.


================
Comment at: include/llvm/Analysis/MemorySSA.h:313
+      return 4;
+    return (int)OAR.getValue();
+  }
----------------
george.burgess.iv wrote:
> Nit: `(int)OAR.getValueOr(4);`? Or does that require awkward casting? If it does need additional casting, I'm happy with this as-is.
The value given as OR is expected to be of the same type inside the Optional, in this case AliasResult. I think it's not a casting issue, but a correctness one; casting the 4 to AliasResult is UB.
Leaving as is, but please correct me if I'm wrong.


Repository:
  rL LLVM

https://reviews.llvm.org/D38569





More information about the llvm-commits mailing list