[PATCH] D13907: [MemorySanitizer] NFC. Do not use GET_INTRINSIC_MODREF_BEHAVIOR table.
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 20 14:35:35 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250860: [MemorySanitizer] NFC. Do not use GET_INTRINSIC_MODREF_BEHAVIOR table. (authored by igor.laevsky).
Changed prior to commit:
http://reviews.llvm.org/D13907?vs=37896&id=37923#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13907
Files:
llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
Index: llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+++ llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
@@ -1918,25 +1918,6 @@
VAHelper->visitVACopyInst(I);
}
- enum IntrinsicKind {
- IK_DoesNotAccessMemory,
- IK_OnlyReadsMemory,
- IK_WritesMemory
- };
-
- static IntrinsicKind getIntrinsicKind(Intrinsic::ID iid) {
- const int FMRB_DoesNotAccessMemory = IK_DoesNotAccessMemory;
- const int FMRB_OnlyReadsArgumentPointees = IK_OnlyReadsMemory;
- const int FMRB_OnlyReadsMemory = IK_OnlyReadsMemory;
- const int FMRB_OnlyAccessesArgumentPointees = IK_WritesMemory;
- const int FMRB_UnknownModRefBehavior = IK_WritesMemory;
-#define GET_INTRINSIC_MODREF_BEHAVIOR
-#define FunctionModRefBehavior IntrinsicKind
-#include "llvm/IR/Intrinsics.gen"
-#undef FunctionModRefBehavior
-#undef GET_INTRINSIC_MODREF_BEHAVIOR
- }
-
/// \brief Handle vector store-like intrinsics.
///
/// Instrument intrinsics that look like a simple SIMD store: writes memory,
@@ -2036,30 +2017,24 @@
if (NumArgOperands == 0)
return false;
- Intrinsic::ID iid = I.getIntrinsicID();
- IntrinsicKind IK = getIntrinsicKind(iid);
- bool OnlyReadsMemory = IK == IK_OnlyReadsMemory;
- bool WritesMemory = IK == IK_WritesMemory;
- assert(!(OnlyReadsMemory && WritesMemory));
-
if (NumArgOperands == 2 &&
I.getArgOperand(0)->getType()->isPointerTy() &&
I.getArgOperand(1)->getType()->isVectorTy() &&
I.getType()->isVoidTy() &&
- WritesMemory) {
+ !I.onlyReadsMemory()) {
// This looks like a vector store.
return handleVectorStoreIntrinsic(I);
}
if (NumArgOperands == 1 &&
I.getArgOperand(0)->getType()->isPointerTy() &&
I.getType()->isVectorTy() &&
- OnlyReadsMemory) {
+ I.onlyReadsMemory()) {
// This looks like a vector load.
return handleVectorLoadIntrinsic(I);
}
- if (!OnlyReadsMemory && !WritesMemory)
+ if (I.doesNotAccessMemory())
if (maybeHandleSimpleNomemIntrinsic(I))
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13907.37923.patch
Type: text/x-patch
Size: 2245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151020/9f601fd3/attachment.bin>
More information about the llvm-commits
mailing list