[PATCH] D12838: [GlobalsAA] Teach GlobalsAA about memory intrinsics
Arnaud de Grandmaison via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 14 08:02:40 PDT 2015
aadg added a subscriber: aadg.
aadg added a comment.
Hi James,
See comment below.
================
Comment at: lib/Analysis/GlobalsModRef.cpp:776-782
@@ +775,9 @@
+ default:
+ return MRI_ModRef;
+ case Intrinsic::memset:
+ return (Operands[0] ? MRI_Mod : MRI_NoModRef);
+ case Intrinsic::memcpy:
+ case Intrinsic::memmove:
+ return static_cast<ModRefInfo>((Operands[0] ? MRI_Mod : MRI_NoModRef) |
+ (Operands[1] ? MRI_Ref : MRI_NoModRef));
+ }
----------------
Shouldn't we also handle the isVolatile argument ? As anything could happen when this is a volatile operation, I think we should always return MRI_ModRef when it is set.
Repository:
rL LLVM
http://reviews.llvm.org/D12838
More information about the llvm-commits
mailing list