[llvm-commits] [PATCH] [msan] Heuristic handling of unknown intrinsics
Alexander Potapenko
glider at google.com
Mon Dec 17 06:28:09 PST 2012
================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:1185
@@ +1184,3 @@
+
+ bool handleVectorLoadIntrinsic(IntrinsicInst &I) {
+ IRBuilder<> IRB(&I);
----------------
Please either add missing doxygen comments, or at least add a FIXME
================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:1248
@@ +1247,3 @@
+ bool ReadsMemory = IK == IK_OnlyReadsMemory;
+ bool WritesMemory = IK == IK_WritesMemory;
+
----------------
Please add an assertion that ReadsMemory != WritesMemory
================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:1216
@@ +1215,3 @@
+
+ for (unsigned i = 0; i < I.getNumArgOperands(); ++i) {
+ Type *Ty = I.getArgOperand(i)->getType();
----------------
Please pre-compute getNumArgOperands in the loop initialization clause. Ditto below.
================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:1291
@@ +1290,3 @@
+ if (!handleUnknownIntrinsic(I))
+ visitInstruction(I);
+ break;
----------------
I suggest putting this on the same line with if. Leaving the decision up to you
http://llvm-reviews.chandlerc.com/D184
More information about the llvm-commits
mailing list