[PATCH] D12838: [GlobalsAA] Teach GlobalsAA about memory intrinsics

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 09:19:12 PDT 2015


sanjoy added a subscriber: sanjoy.

================
Comment at: lib/Analysis/GlobalsModRef.cpp:771
@@ +770,3 @@
+  SmallVector<bool,4> Operands;
+  for (auto &U : CS.args())
+    Operands.push_back(GetUnderlyingObject(&*U, DL) == GV);
----------------
I'd rather have this be a lambda that takes an argument index instead of an eagerly populated vector, given that for most intrinsics this isn't used.

================
Comment at: lib/Analysis/GlobalsModRef.cpp:776
@@ +775,3 @@
+  default:
+    return MRI_ModRef;
+  case Intrinsic::memset:
----------------
aadg wrote:
> 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.
Can we do something more precise here if the intrinsic is readonly or readnone?


Repository:
  rL LLVM

http://reviews.llvm.org/D12838





More information about the llvm-commits mailing list