hanchenye-llvm-project/llvm/lib/Transforms/Utils
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
..
ASanStackFrameLayout.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AddDiscriminators.cpp [llvm] Clarify responsiblity of some of DILocation discriminator APIs 2019-01-24 00:10:25 +00:00
BasicBlockUtils.cpp [NFC] Tweak SplitBlockAndInsertIfThen to use existing ThenBlock 2019-02-15 08:18:00 +00:00
BreakCriticalEdges.cpp [NFC] Rename DontDeleteUselessPHIs --> KeepOneInputPHIs 2019-02-12 07:09:29 +00:00
BuildLibCalls.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
BypassSlowDivision.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [ThinLTO] Handle chains of aliases 2019-01-04 19:04:54 +00:00
CallPromotionUtils.cpp [opaque pointer types] Pass function type for CallBase::setCalledFunction. 2019-02-01 20:44:54 +00:00
CanonicalizeAliases.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CloneFunction.cpp Move DomTreeUpdater from IR to Analysis 2019-02-06 02:52:52 +00:00
CloneModule.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeExtractor.cpp [CodeExtractor] Do not lift lifetime.end markers for region inputs 2019-02-15 18:46:58 +00:00
CtorUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DemoteRegToStack.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
EntryExitInstrumenter.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
EscapeEnumerator.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
Evaluator.cpp [CallSite removal] Migrate ConstantFolding APIs and implementation to 2019-02-11 07:51:44 +00:00
FlattenCFG.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FunctionComparator.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FunctionImportUtils.cpp Recommit "[ThinLTO] Rename COMDATs for COFF when promoting/renaming COMDAT leader" 2019-01-31 17:18:11 +00:00
GlobalStatus.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GuardUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ImportedFunctionsInliningStatistics.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InlineFunction.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
InstructionNamer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IntegerDivision.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LCSSA.cpp [LCSSA] Handle case with single new PHI faster. 2019-02-02 15:26:05 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LibCallsShrinkWrap.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Local.cpp [DebugInfo] Don't salvage load operations (PR40628). 2019-02-12 10:54:30 +00:00
LoopRotationUtils.cpp Move DomTreeUpdater from IR to Analysis 2019-02-06 02:52:52 +00:00
LoopSimplify.cpp [NFC] Rename DontDeleteUselessPHIs --> KeepOneInputPHIs 2019-02-12 07:09:29 +00:00
LoopUnroll.cpp [llvm] Clarify responsiblity of some of DILocation discriminator APIs 2019-01-24 00:10:25 +00:00
LoopUnrollAndJam.cpp [llvm] Clarify responsiblity of some of DILocation discriminator APIs 2019-01-24 00:10:25 +00:00
LoopUnrollPeel.cpp [LoopUnrollPeel] Add case where we should forget the peeled loop from SCEV. 2019-02-14 13:59:39 +00:00
LoopUnrollRuntime.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoopUtils.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
LoopVersioning.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LowerInvoke.cpp [opaque pointer types] Pass function types to CallInst creation. 2019-02-01 20:43:25 +00:00
LowerMemIntrinsics.cpp [opaque pointer types] Pass value type to GetElementPtr creation. 2019-02-01 20:44:47 +00:00
LowerSwitch.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Mem2Reg.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MetaRenamer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleUtils.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
NameAnonGlobals.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PredicateInfo.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
PromoteMemoryToRegister.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SSAUpdater.cpp [LICM/MSSA] Add promotion to scalars by building an AliasSetTracker with MemorySSA. 2019-02-06 20:25:17 +00:00
SSAUpdaterBulk.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerStats.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
SimplifyCFG.cpp [NFC] Rename DontDeleteUselessPHIs --> KeepOneInputPHIs 2019-02-12 07:09:29 +00:00
SimplifyIndVar.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SimplifyLibCalls.cpp [opaque pointer types] Pass value type to GetElementPtr creation. 2019-02-01 20:44:47 +00:00
SplitModule.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StripGCRelocates.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StripNonLineTableDebugInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SymbolRewriter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnifyFunctionExitNodes.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Utils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
VNCoercion.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
ValueMapper.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00