[PATCH] Implement variable-sized alloca instrumentation.
Maxim Ostapenko
m.ostapenko at partner.samsung.com
Tue Nov 18 05:39:36 PST 2014
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:656
@@ +655,3 @@
+ Int32PtrTy);
+ // if (PartialSize) {
+ // PartialRzMagic = calculatePartialRzMagic(PartialSize);
----------------
kcc wrote:
> instead of creating a new BB for partial RZ, I would do this:
> make sure that PartialSize is never zero, i.e. instead of being in 0..31 it is in 1..32
> This is better as we will not need to keep both pointers (PartialRz and RightRz) alive throughout the procedure.
Yes, this is a good idea to avoid new BB creation. But we still need both PartialRz and RightRz, because in case of PartialSize == 32 PartialRz points the same address as RightRz, otherwise RightRz == PartialSize + 32, isn't it?
Or maybe I've misunderstood something?
http://reviews.llvm.org/D6055
More information about the llvm-commits
mailing list