[PATCH] D24854: [SROA] Drop lifetime.start/end intrinsics when they block promotion.
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 14:17:32 PDT 2016
chandlerc added a comment.
Awesome, I'm glad this was so easy. Tiny nit picks below.
> SROA.cpp:2883-2884
> + // promoted, but PromoteMemToReg doesn't handle that case.)
> + // FIXME: Check whether the alloca is promotable before dropping the
> + // lifetime intrinsics?
> + bool IsWholeAlloca = NewBeginOffset == NewAllocaBeginOffset &&
We also don't want to do this if the function is being instrumented by ASan as this will undermine scope checking using lifetime markers.
> SROA.cpp:2885-2887
> + bool IsWholeAlloca = NewBeginOffset == NewAllocaBeginOffset &&
> + NewEndOffset == NewAllocaEndOffset;
> + if (!IsWholeAlloca)
Since we just always can promote through lifetime intrinsics now, I would skip the variable entirely.
Repository:
rL LLVM
https://reviews.llvm.org/D24854
More information about the llvm-commits
mailing list