[CodeExtractor] Emit lifetime markers around reloads of outputs
CodeExtractor permits extracting a region of blocks from a function even
when values defined within the region are used outside of it.
This is typically done by creating an alloca in the original function
and reloading the alloca after a call to the extracted function.
Wrap the reload in lifetime start/end markers to promote stack coloring.
Suggested by Sergei Kachkov!
Differential Revision: https://reviews.llvm.org/D56045
llvm-svn: 351621
diff --git a/llvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll b/llvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll
index 6b907ee..2f5360c 100644
--- a/llvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll
+++ b/llvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll
@@ -12,8 +12,11 @@
; CHECK-NEXT: ]
;
; CHECK: codeRepl:
+; CHECK-NEXT: bitcast
+; CHECK-NEXT: lifetime.start
; CHECK-NEXT: call void @pluto.cold.1(i1* %tmp8.ce.loc)
; CHECK-NEXT: %tmp8.ce.reload = load i1, i1* %tmp8.ce.loc
+; CHECK-NEXT: lifetime.end
; CHECK-NEXT: br label %bb7
;
; CHECK: bb7: