[PATCH] D82680: MSAN: Allow emitting checks for struct types
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 20:38:28 PDT 2020
vitalybuka accepted this revision.
vitalybuka added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1415
+ Value *convertShadowToScalar(Value *V, IRBuilder<> &IRB) {
+ if (StructType *Struct = dyn_cast<StructType>(V->getType())) {
+ return collapseStructShadow(Struct, V, IRB);
----------------
this code do not uses {} for one line blocks
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1428
+ assert(VTy->isIntegerTy());
+ if (VTy->getIntegerBitWidth() == 1)
+ // Convert bool to bool is a nop
----------------
do you see a difference without this check?
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1430
+ // Convert bool to bool is a nop
+ return V;
+ return IRB.CreateICmpNE(V, ConstantInt::get(VTy, 0), name);
----------------
this comment is not very useful
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82680/new/
https://reviews.llvm.org/D82680
More information about the llvm-commits
mailing list