llvm-project/llvm/test/Transforms/CodeExtractor
Vedant Kumar 5f5cac3ae2 [CodeExtractor] Do not lift lifetime.end markers for region inputs
If a lifetime.end marker occurs along one path through the extraction
region, but not another, then it's still incorrect to lift the marker,
because there is some path through the extracted function which would
ordinarily not reach the marker. If the call to the extracted function
is in a loop, unrolling can cause inputs to the function to become
optimized out as undef after the first iteration.

To prevent incorrect stack slot merging in the calling function, it
should be sufficient to lift lifetime.start markers for region inputs.
I've tested this theory out by doing a stage2 check-all with randomized
splitting enabled.

This is a follow-up to r353973, and there's additional context for this
change in https://reviews.llvm.org/D57834.

rdar://47896986

Differential Revision: https://reviews.llvm.org/D58253

llvm-svn: 354159
2019-02-15 18:46:58 +00:00
..
X86
2004-03-13-LoopExtractorCrash.ll
2004-03-14-DominanceProblem.ll
2004-03-14-NoSwitchSupport.ll
2004-03-17-MissedLiveIns.ll
2004-03-17-UpdatePHIsOutsideRegion.ll
2004-03-18-InvokeHandling.ll
2004-08-12-BlockExtractPHI.ll
2004-11-12-InvokeExtract.ll
BlockAddressReference.ll
BlockAddressSelfReference.ll
ExtractedFnEntryCount.ll
MultipleExitBranchProb.ll
PartialInlineAlloca.ll
PartialInlineAlloca2.ll
PartialInlineAlloca4.ll [CodeExtractor] Do not lift lifetime.end markers for region inputs 2019-02-15 18:46:58 +00:00
PartialInlineAlloca5.ll [CodeExtractor] Do not extract unsafe lifetime markers 2019-01-04 17:43:22 +00:00
PartialInlineAnd.ll
PartialInlineAndOr.ll
PartialInlineAttributes.ll
PartialInlineCallRef.ll
PartialInlineDebug.ll [CodeExtractor] Emit lifetime markers around reloads of outputs 2019-01-19 02:37:59 +00:00
PartialInlineEntryPHICost.ll [PartialInliner] Make PHIs free in cost computation. 2018-11-27 18:17:27 +00:00
PartialInlineEntryUpdate.ll
PartialInlineHighCost.ll
PartialInlineInvokeProducesOutVal.ll [CodeExtractor] Emit lifetime markers around reloads of outputs 2019-01-19 02:37:59 +00:00
PartialInlineLiveAcross.ll
PartialInlineNoInline.ll
PartialInlineNoLiveOut.ll
PartialInlineNotViable.ll
PartialInlineORECrash.ll
PartialInlineOptRemark.ll
PartialInlineOr.ll
PartialInlineOrAnd.ll
PartialInlinePGOMultiRegion.ll
PartialInlinePGORegion.ll
PartialInlineVarArg.ll
PartialInlineVarArgsDebug.ll [CodeExtractor] Emit lifetime markers around reloads of outputs 2019-01-19 02:37:59 +00:00
SingleCondition.ll
cost.ll
cost_meta.ll
extract-assume.ll [CodeExtractor] Update function's assumption cache after extracting blocks from it 2019-02-08 06:55:18 +00:00
inline_eh.ll
inline_eh_1.ll
live_shrink.ll
live_shrink_gep.ll
live_shrink_hoist.ll
live_shrink_multiple.ll
live_shrink_unsafe.ll
unreachable-block.ll