mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
51ad1efef5
From C11 and C++11 onwards, a forward-progress requirement has been introduced for both languages. In the case of C, loops with non-constant conditionals that do not have any observable side-effects (as defined by 6.8.5p6) can be assumed by the implementation to terminate, and in the case of C++, this assumption extends to all functions. The clang frontend will emit the `mustprogress` function attribute for C++ functions (D86233, D85393, D86841) and emit the loop metadata `llvm.loop.mustprogress` for every loop in C11 or later that has a non-constant conditional. This patch modifies LoopDeletion so that only loops with the `llvm.loop.mustprogress` metadata or loops contained in functions that are required to make progress (`mustprogress` or `willreturn`) are checked for observable side-effects. If these loops do not have an observable side-effect, then we delete them. Loops without observable side-effects that do not satisfy the above conditions will not be deleted. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D86844 |
||
---|---|---|
.. | ||
AddDiscriminators.cpp | ||
AMDGPUEmitPrintf.cpp | ||
ASanStackFrameLayout.cpp | ||
AssumeBundleBuilder.cpp | ||
BasicBlockUtils.cpp | ||
BreakCriticalEdges.cpp | ||
BuildLibCalls.cpp | ||
BypassSlowDivision.cpp | ||
CallGraphUpdater.cpp | ||
CallPromotionUtils.cpp | ||
CanonicalizeAliases.cpp | ||
CanonicalizeFreezeInLoops.cpp | ||
CloneFunction.cpp | ||
CloneModule.cpp | ||
CMakeLists.txt | ||
CodeExtractor.cpp | ||
CodeMoverUtils.cpp | ||
CtorUtils.cpp | ||
Debugify.cpp | ||
DemoteRegToStack.cpp | ||
EntryExitInstrumenter.cpp | ||
EscapeEnumerator.cpp | ||
Evaluator.cpp | ||
FixIrreducible.cpp | ||
FlattenCFG.cpp | ||
FunctionComparator.cpp | ||
FunctionImportUtils.cpp | ||
GlobalStatus.cpp | ||
GuardUtils.cpp | ||
ImportedFunctionsInliningStatistics.cpp | ||
InjectTLIMappings.cpp | ||
InlineFunction.cpp | ||
InstructionNamer.cpp | ||
IntegerDivision.cpp | ||
LCSSA.cpp | ||
LibCallsShrinkWrap.cpp | ||
LLVMBuild.txt | ||
Local.cpp | ||
LoopPeel.cpp | ||
LoopRotationUtils.cpp | ||
LoopSimplify.cpp | ||
LoopUnroll.cpp | ||
LoopUnrollAndJam.cpp | ||
LoopUnrollRuntime.cpp | ||
LoopUtils.cpp | ||
LoopVersioning.cpp | ||
LowerInvoke.cpp | ||
LowerMemIntrinsics.cpp | ||
LowerSwitch.cpp | ||
MatrixUtils.cpp | ||
Mem2Reg.cpp | ||
MetaRenamer.cpp | ||
MisExpect.cpp | ||
ModuleUtils.cpp | ||
NameAnonGlobals.cpp | ||
PredicateInfo.cpp | ||
PromoteMemoryToRegister.cpp | ||
SanitizerStats.cpp | ||
ScalarEvolutionExpander.cpp | ||
SimplifyCFG.cpp | ||
SimplifyIndVar.cpp | ||
SimplifyLibCalls.cpp | ||
SizeOpts.cpp | ||
SplitModule.cpp | ||
SSAUpdater.cpp | ||
SSAUpdaterBulk.cpp | ||
StripGCRelocates.cpp | ||
StripNonLineTableDebugInfo.cpp | ||
SymbolRewriter.cpp | ||
UnifyFunctionExitNodes.cpp | ||
UnifyLoopExits.cpp | ||
UniqueInternalLinkageNames.cpp | ||
Utils.cpp | ||
ValueMapper.cpp | ||
VNCoercion.cpp |