[llvm-commits] [PATCH] AddressSanitizer: handle llvm.lifetime intrinsics (LLVM part)
Kostya Serebryany
kcc at google.com
Fri Nov 30 04:42:08 PST 2012
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1281
@@ +1280,3 @@
+ Value *SizeArg = ConstantInt::get(IntptrTy, Size);
+ if (DoPoison)
+ IRB.CreateCall2(AsanPoisonStackMemoryFunc, AddrArg, SizeArg);
----------------
maybe like this?
DoPoison ? AsanPoisonStackMemoryFunc : AsanUnpoisonStackMemoryFunc
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:1121
@@ +1120,3 @@
+ if (AllocaType == Int8PtrTy)
+ Res |= handleValueLifetime(Alloca);
+ for (Value::use_iterator UI = Alloca->use_begin(), UE = Alloca->use_end();
----------------
This function where you call handleValueLifetime multiple times is hard to understand. I'd really prefer to iterate over all llvm.lifetime.start
markers instead.
http://llvm-reviews.chandlerc.com/D140
More information about the llvm-commits
mailing list