[PATCH] D55967: [CodeExtractor] Do not extract unsafe lifetime markers

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 21 11:15:34 PST 2018


davidxl added inline comments.


================
Comment at: llvm/test/Transforms/CodeExtractor/PartialInlineAlloca4.ll:12
+; CHECK-NEXT: call void @callee_unknown_use1.{{.*}}(i8* %tmp.i
+; CHECK-NEXT: call void @llvm.lifetime.end.p0i8(i64 -1, i8* %tmp.i)
+
----------------
vsk wrote:
> davidxl wrote:
> > The purpose of the extraction is to shrink the alloca call into the outlined function and thus reducing call overhead of the outline function. This fix breaks that.
> > 
> > 
> Here, the alloca remains in 'caller' both without and with this patch. Are you suggesting that lifetime markers have an affect on codegen even when the referenced alloca is in a different function? I don't see why this would be, but if so, would the right fix be to only move lifetime markers out of outlined code when there are conflicting markers in the caller?
Sorry I mis-read the test case.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55967/new/

https://reviews.llvm.org/D55967





More information about the llvm-commits mailing list