[PATCH] D38569: Expose must/may alias info in MemorySSA.
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 15:06:03 PST 2018
george.burgess.iv added inline comments.
================
Comment at: include/llvm/Analysis/MemorySSA.h:313
+ return 4;
+ return (int)OAR.getValue();
+ }
----------------
asbirlea wrote:
> 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.
Ick, yeah, good call. WFM!
Repository:
rL LLVM
https://reviews.llvm.org/D38569
More information about the llvm-commits
mailing list