forked from OSchip/llvm-project
a1778df474
Lifetime markers which reference inputs to the extraction region are not safe to extract. Example ('rhs' will be extracted): ``` entry: +------------+ | x = alloca | | y = alloca | +------------+ / \ lhs: rhs: +-------------------+ +-------------------+ | lifetime_start(x) | | lifetime_start(x) | | use(x) | | lifetime_start(y) | | lifetime_end(x) | | use(x, y) | | lifetime_start(y) | | lifetime_end(y) | | use(y) | | lifetime_end(x) | | lifetime_end(y) | +-------------------+ +-------------------+ ``` Prior to extraction, the stack coloring pass sees that the slots for 'x' and 'y' are in-use at the same time. After extraction, the coloring pass infers that 'x' and 'y' are *not* in-use concurrently, because markers from 'rhs' are no longer available to help decide otherwise. This leads to a miscompile, because the stack slots actually are in-use concurrently in the extracted function. Fix this by moving lifetime start/end markers for memory regions defined in the calling function around the call to the extracted function. Fixes llvm.org/PR39671 (rdar://45939472). Differential Revision: https://reviews.llvm.org/D55967 llvm-svn: 350420 |
||
---|---|---|
.. | ||
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 | ||
PartialInlineAlloca5.ll | ||
PartialInlineAnd.ll | ||
PartialInlineAndOr.ll | ||
PartialInlineAttributes.ll | ||
PartialInlineCallRef.ll | ||
PartialInlineDebug.ll | ||
PartialInlineEntryPHICost.ll | ||
PartialInlineEntryUpdate.ll | ||
PartialInlineHighCost.ll | ||
PartialInlineInvokeProducesOutVal.ll | ||
PartialInlineLiveAcross.ll | ||
PartialInlineNoInline.ll | ||
PartialInlineNoLiveOut.ll | ||
PartialInlineNotViable.ll | ||
PartialInlineORECrash.ll | ||
PartialInlineOptRemark.ll | ||
PartialInlineOr.ll | ||
PartialInlineOrAnd.ll | ||
PartialInlinePGOMultiRegion.ll | ||
PartialInlinePGORegion.ll | ||
PartialInlineVarArg.ll | ||
PartialInlineVarArgsDebug.ll | ||
SingleCondition.ll | ||
cost.ll | ||
cost_meta.ll | ||
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 |