llvm-project/llvm/lib/Transforms/Utils
Roman Lebedev b5822026dd
[SimplifyCFG] 'Fold branch to common dest': don't overestimate the cost
`FoldBranchToCommonDest()` has a certain budget (`-bonus-inst-threshold=`)
for bonus instruction duplication. And currently it calculates the cost
as-if it will actually duplicate into each predecessor.

But ignoring the budget, it won't always duplicate into each predecessor,
there are some correctness and profitability checks.
So when calculating the cost, we should first check into which blocks
will we *actually* duplicate, and only then use that block count
to do budgeting.
2021-03-23 18:30:26 +03:00
..
AMDGPUEmitPrintf.cpp [OpaquePtrs] Remove some uses of type-less CreateLoad APIs (NFC) 2021-03-11 14:40:57 +01:00
ASanStackFrameLayout.cpp
AddDiscriminators.cpp
AssumeBundleBuilder.cpp [AssumeBundles] Add nonnull/align to op bundle if noundef exists 2021-03-16 10:23:42 +09:00
AutoInitRemark.cpp [Remarks] Emit variable info in auto-init remarks 2021-03-04 12:51:22 -08:00
BasicBlockUtils.cpp Reapply "[DebugInfo] Handle multiple variable location operands in IR" 2021-03-17 16:45:25 +00:00
BreakCriticalEdges.cpp BreakCriticalEdges: do not split the critical edge from a CallBr indirect successor 2021-01-15 13:51:47 -08:00
BuildLibCalls.cpp [BuildLibCalls] Add noundef to allocator fns' size 2021-02-23 13:58:03 +09:00
BypassSlowDivision.cpp
CMakeLists.txt Revert "[Passes] Add relative lookup table converter pass" 2021-03-23 00:43:16 +00:00
CallGraphUpdater.cpp [CGSCC][Coroutine][NewPM] Properly support function splitting/outlining 2021-01-06 11:19:15 -08:00
CallPromotionUtils.cpp [llvm] Construct SmallVector with iterator ranges (NFC) 2021-01-20 21:35:52 -08:00
CanonicalizeAliases.cpp
CanonicalizeFreezeInLoops.cpp [ValueTracking] Use assume's noundef operand bundle 2020-10-14 20:16:33 +09:00
CloneFunction.cpp [NFC] clang-format llvm/lib/Transforms/Utils/CloneFunction.cpp 2021-03-23 12:53:28 +00:00
CloneModule.cpp TransformUtils: Fix metadata handling in CloneModule (and improve CloneFunctionInto) 2021-02-15 11:56:00 -08:00
CodeExtractor.cpp [IR] Add vscale_range IR function attribute 2021-03-22 12:05:06 +00:00
CodeMoverUtils.cpp [CodeGen, Transforms] Use llvm::any_of (NFC) 2020-12-24 09:08:36 -08:00
CtorUtils.cpp
Debugify.cpp Reapply "[DebugInfo] Handle multiple variable location operands in IR" 2021-03-17 16:45:25 +00:00
DemoteRegToStack.cpp
EntryExitInstrumenter.cpp [NFC][EntryExitInstrumenter] Mark Dominator Tree as preserved in legacy-PM too 2021-01-29 01:11:33 +03:00
EscapeEnumerator.cpp [ShadowStackGCLowering] Preserve Dominator Tree, if avaliable 2021-01-30 01:14:51 +03:00
Evaluator.cpp [Transforms/Utils] Use range-based for loops (NFC) 2021-02-26 22:36:40 -08:00
FixIrreducible.cpp [Transforms/Utils] Use range-based for loops (NFC) 2021-02-07 09:49:36 -08:00
FlattenCFG.cpp
FunctionComparator.cpp Fix use-of-uninitialized-value in rG75f50e15bf8f 2020-11-26 01:39:22 -07:00
FunctionImportUtils.cpp [LTO] Perform DSOLocal propagation in combined index 2021-02-12 22:58:26 -08:00
GlobalStatus.cpp [globalopt] Teach to look through `addrspacecast`. 2020-10-16 08:43:09 -04:00
GuardUtils.cpp [llvm] Construct SmallVector with iterator ranges (NFC) 2021-01-20 21:35:52 -08:00
HelloWorld.cpp [NewPM][HelloWorld] Move HelloWorld to Utils 2021-02-03 12:59:40 -08:00
InjectTLIMappings.cpp [NFC][Analysis] Change struct VecDesc to use ElementCount 2021-02-12 11:07:58 +00:00
InlineFunction.cpp [SamplePGO] Skip inlinee profile scaling for sample loader inlining 2021-03-11 10:18:26 -08:00
InstructionNamer.cpp Port -instnamer to NPM 2020-10-22 12:08:36 -07:00
IntegerDivision.cpp
LCSSA.cpp [DebugInfo] Support DIArgList in DbgVariableIntrinsic 2021-03-08 14:36:13 +00:00
LibCallsShrinkWrap.cpp
Local.cpp Reapply "[DebugInfo] Handle multiple variable location operands in IR" 2021-03-17 16:45:25 +00:00
LoopPeel.cpp [NFC] One more use case for evaluatePredicate 2021-03-18 19:21:29 +07:00
LoopRotationUtils.cpp Reapply "[DebugInfo] Handle multiple variable location operands in IR" 2021-03-17 16:45:25 +00:00
LoopSimplify.cpp [Transforms/Utils] Use range-based for loops (NFC) 2021-02-07 09:49:36 -08:00
LoopUnroll.cpp [Utils] Use NoAliasScopeDeclInst in a few more places (NFC) 2021-01-24 16:24:11 +01:00
LoopUnrollAndJam.cpp LoopUnrollAndJam] Only allow loops with single exit(ing) blocks 2021-02-05 16:10:53 +00:00
LoopUnrollRuntime.cpp [LoopUnrollRuntime] Add option to assume the non latch exit block to be 2021-03-03 20:43:31 +00:00
LoopUtils.cpp [Vectorizers][TTI] remove option to bypass creation of vector reduction intrinsics 2021-02-12 08:13:50 -05:00
LoopVersioning.cpp Revert "[LV] Unconditionally branch from middle to scalar preheader if the scalar loop must execute" 2021-02-05 12:51:03 +01:00
LowerInvoke.cpp [Transforms/Utils] Construct SmallVector with iterator ranges (NFC) 2020-12-29 19:23:23 -08:00
LowerMemIntrinsics.cpp
LowerSwitch.cpp [Transforms] Use llvm::erase_if (NFC) 2020-12-17 19:53:10 -08:00
MatrixUtils.cpp
Mem2Reg.cpp
MetaRenamer.cpp [Transforms/Utils] Use range-based for loops (NFC) 2021-02-07 09:49:36 -08:00
ModuleUtils.cpp [LTO] Fix cloning of llvm*.used when splitting module 2021-02-20 09:46:43 -08:00
NameAnonGlobals.cpp
PredicateInfo.cpp Revert of D49126 [PredicateInfo] Use custom mangling to support ssa_copy with unnamed types. 2021-03-20 11:37:09 +01:00
PromoteMemoryToRegister.cpp [Transforms/Utils] Use range-based for loops (NFC) 2021-02-26 22:36:40 -08:00
SSAUpdater.cpp [Transforms/Utils] Use range-based for loops (NFC) 2021-02-02 22:52:47 -08:00
SSAUpdaterBulk.cpp
SampleProfileLoaderBaseUtil.cpp [SampleFDO] Third Try: Refactor SampleProfile.cpp 2021-02-17 15:31:50 -08:00
SanitizerStats.cpp
ScalarEvolutionExpander.cpp [NFCI] SCEVExpander: emit intrinsics for integral {u,s}{min,max} SCEV expressions 2021-03-06 21:52:46 +03:00
SimplifyCFG.cpp [SimplifyCFG] 'Fold branch to common dest': don't overestimate the cost 2021-03-23 18:30:26 +03:00
SimplifyIndVar.cpp [IndVars] Sharpen context in eliminateIVComparison 2021-03-22 11:55:57 +07:00
SimplifyLibCalls.cpp [InstCombine][SimplifyLibCalls] An extra sqrtf was produced because of transformations in optimizePow function 2021-03-10 12:33:05 -05:00
SizeOpts.cpp
SplitModule.cpp [LTO] Update splitCodeGen to take a reference to the module. (NFC) 2021-01-29 11:53:11 +00:00
StripGCRelocates.cpp Port StripGCRelocates pass to NPM 2020-10-07 14:41:29 -07:00
StripNonLineTableDebugInfo.cpp [NPM] Port strip nonlinetable debuginfo pass to the new pass manager 2020-10-07 14:35:36 -07:00
SymbolRewriter.cpp
UnifyFunctionExitNodes.cpp [NPM] Port -mergereturn to NPM 2020-10-20 10:33:58 -07:00
UnifyLoopExits.cpp Remove unnecessary header include which violates layering 2020-10-20 20:14:03 -07:00
Utils.cpp Revert "[Passes] Add relative lookup table converter pass" 2021-03-23 00:43:16 +00:00
VNCoercion.cpp [VNCoercion] Disallow coercion between different ni addrspaces 2020-12-07 20:19:48 -05:00
ValueMapper.cpp [ValueMapper] Add debug output for metadata remapping 2021-03-11 09:54:55 +08:00