[llvm-commits] [PATCH] [msan] Heuristic handling on unknown intrinsics
Evgeniy Stepanov
eugenis at google.com
Tue Dec 11 05:21:30 PST 2012
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1240
@@ +1239,3 @@
+ } else {
+ // Two pointer operands? Meh.
+ visitInstruction(I);
----------------
Kostya Serebryany wrote:
> Does this ever happen?
> Maybe add an assert for debug mode?
> In release more we'll call visitInstruction
It does.
gcread, gcwrite, init_trampoline, adjust_trampoline, neon_vld2lane and friends (ARM).
We either don't want to instrument these, or want to special-case them.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1249
@@ +1248,3 @@
+
+ if (pointerOpIdx < 0 && (readsMemory || writesMemory)) {
+ // No idea how to handle this.
----------------
Kostya Serebryany wrote:
> same here. Maybe add an assert?
It happens, for example, with memory barriers.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1331
@@ +1330,3 @@
+ Value *ShadowPtr = getShadowPtr(Op, MemAccessShadowTy, IRB);
+ IRB.CreateAlignedStore(Shadow, ShadowPtr, 1);
+ if (ClTrackOrigins)
----------------
Kostya Serebryany wrote:
> This 'alignment 1' deserves a comment
Done. There is a related comment about the unaligned load above, btw.
http://llvm-reviews.chandlerc.com/D184
More information about the llvm-commits
mailing list