llvm-project/llvm/test/Transforms
Fedor Sergeev 2e3e224e71 [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with
We need to control exponential behavior of loop-unswitch so we do not get
run-away compilation.

Suggested solution is to introduce a multiplier for an unswitch cost that
makes cost prohibitive as soon as there are too many candidates and too
many sibling loops (meaning we have already started duplicating loops
by unswitching).

It does solve the currently known problem with compile-time degradation
(PR 39544).

Tests are built on top of a recently implemented CHECK-COUNT-<num>
FileCheck directives.

Reviewed By: chandlerc, mkazantsev
Differential Revision: https://reviews.llvm.org/D54223

llvm-svn: 347097
2018-11-16 21:16:43 +00:00
..
ADCE [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
AddDiscriminators [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
AggressiveInstCombine [AggressiveInstCombine] avoid crashing on unsimplified code (PR37446) 2018-05-14 13:43:32 +00:00
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand AMDGPU: Expand atomicrmw nand in IR 2018-10-02 03:50:56 +00:00
BDCE [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
BlockExtractor [hot-cold-split] Name split functions with ".cold" suffix 2018-10-24 18:53:47 +00:00
BranchFolding
CallSiteSplitting Recommit r346483: [CallSiteSplitting] Only record conditions up to the IDom(call site). 2018-11-14 10:04:30 +00:00
CalledValuePropagation
CodeExtractor [hot-cold-split] Name split functions with ".cold" suffix 2018-10-24 18:53:47 +00:00
CodeGenPrepare Fix a use-after-RAUW bug in large GEP splitting 2018-10-19 19:02:16 +00:00
ConstProp Disable calls to *_finite and other glibc-only functions on Musl. 2018-11-06 18:23:32 +00:00
ConstantHoisting X86/TargetTransformInfo: Report div/rem constant immediate costs as TCC_Free 2018-10-11 23:14:35 +00:00
ConstantMerge
Coroutines [Coroutines] PR34897: Fix incorrect elisions 2018-05-11 03:12:28 +00:00
CorrelatedValuePropagation [CVP] Extend tests to illustrate an old patch isn't needed 2018-08-24 21:56:43 +00:00
CrossDSOCFI
DCE
DeadArgElim [deadargelim] Update dbg.value of 'unused' parameters 2018-09-24 10:01:24 +00:00
DeadStoreElimination [BasicAA] Don't assume tail calls with byval don't alias allocas 2018-08-14 01:24:35 +00:00
DivRemPairs
EarlyCSE [EarlyCSEwMemorySSA] Add MSSA verification and tests to make EarlyCSE failures easier to track. 2018-09-17 22:35:21 +00:00
EliminateAvailableExternally
EntryExitInstrumenter [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
ExpandMemCmp/X86
Float2Int
ForcedFunctionAttrs
FunctionAttrs [FuncAttrs] Remove "access range attributes" for read-none functions 2018-09-11 11:51:29 +00:00
FunctionImport [ThinLTO] Update handling of vararg functions to match inliner 2018-11-14 19:30:13 +00:00
GCOVProfiling [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
GVN [Local] Keep K's range if K does not move when combining metadata. 2018-10-27 16:53:45 +00:00
GVNHoist [MemorySSAUpdater] Avoid creating self-referencing MemoryDefs 2018-09-11 14:29:59 +00:00
GVNSink [Local] Make DoesKMove required for combineMetadata. 2018-08-24 11:40:04 +00:00
GlobalDCE GlobalDCE: Teach isEmptyFunction() to ignore debug intrinsics. 2018-11-16 17:47:21 +00:00
GlobalMerge [GlobalMerge] Allow merging globals with explicit section markings. 2018-08-02 23:54:16 +00:00
GlobalOpt [DebugInfo][GlobalOpt] Fix -debugify for globalopt shrinking globals to booleans. 2018-10-23 16:35:51 +00:00
GlobalSplit
GuardWidening [GuardWidening] Ignore guards with trivial conditions 2018-08-22 02:40:49 +00:00
HotColdSplit [CodeExtractor] Mark functions noreturn when applicable 2018-11-08 17:57:09 +00:00
IPConstantProp Recommit r333268: [IPSCCP] Use PredicateInfo to propagate facts from cmp instructions. 2018-08-23 11:04:00 +00:00
IRCE Revert "[SCEV][NFC] Check NoWrap flags before lexicographical comparison of SCEVs" 2018-08-27 21:41:37 +00:00
IndVarSimplify Return "[IndVars] Smart hard uses detection" 2018-11-08 11:54:35 +00:00
IndirectBrExpand
InferAddressSpaces AMDGPU: Fix tests using old number for constant address space 2018-09-10 02:54:25 +00:00
InferFunctionAttrs Disable calls to *_finite and other glibc-only functions on Musl. 2018-11-06 18:23:32 +00:00
Inline [Inliner] Penalise inlining of calls with loops at Oz 2018-11-05 14:54:34 +00:00
InstCombine [InstCombine] adjust rotate direction in tests; NFC 2018-11-15 19:15:41 +00:00
InstMerge [DebugInfo][InstMerge] Fix -debugify for phi node created by -mldst-motion 2018-11-02 18:25:41 +00:00
InstNamer
InstSimplify [InstSimplify] add tests for saturating add/sub; NFC 2018-11-16 16:32:34 +00:00
InterleavedAccess
Internalize
JumpThreading [JumpThreading] Fix exponential time algorithm computing known values. 2018-11-09 22:35:26 +00:00
LCSSA [DebugInfo][LCSSA] Rewrite pre-existing debug values outside loop 2018-10-16 08:06:48 +00:00
LICM [LICM] Hoist guards from non-header blocks 2018-11-12 09:29:58 +00:00
LoadStoreVectorizer AMDGPU: Fix private handling for allowsMisalignedMemoryAccesses 2018-09-24 13:18:15 +00:00
LoopDataPrefetch [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
LoopDeletion
LoopDistribute [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
LoopIdiom SCEV should forget all loops containing a deleted block. 2018-08-09 17:53:26 +00:00
LoopInstSimplify Update MemorySSA in LoopInstSimplify. 2018-08-22 20:05:21 +00:00
LoopInterchange [LoopInterchange] Support reductions across inner and outer loop. 2018-11-08 20:44:19 +00:00
LoopLoadElim
LoopPredication [LoopPredication] Add profitability check based on BPI 2018-03-22 16:03:59 +00:00
LoopReroll [LoopReroll] Rewrite induction variable rewriting. 2018-06-22 22:58:55 +00:00
LoopRotate Update MemorySSA in LoopRotate. 2018-10-24 22:46:45 +00:00
LoopSimplify Revert r346810 "Preserve loop metadata when splitting exit blocks" 2018-11-14 01:47:32 +00:00
LoopSimplifyCFG [NFC] Add missing test case, some test renaming 2018-11-07 05:58:10 +00:00
LoopStrengthReduce [LSR] Combine unfolded offset into invariant register 2018-11-08 09:01:19 +00:00
LoopUnroll [LoopUnroll] allow customization for new-pass-manager version of LoopUnroll 2018-10-31 14:33:14 +00:00
LoopUnrollAndJam [UnJ] Improve explicit loop count checks 2018-08-11 07:37:31 +00:00
LoopUnswitch Update MemorySSA in LoopUnswitch. 2018-09-11 19:19:21 +00:00
LoopVectorize [CostModel] Add more realistic SK_InsertSubvector generic costs. 2018-11-12 15:20:24 +00:00
LoopVersioning Re-apply "[SCEV] Strengthen StrengthenNoWrapFlags (reapply r334428)." 2018-07-13 23:58:46 +00:00
LoopVersioningLICM
LowerAtomic
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
LowerTypeTests [LowerTypeTests] Limit when icall jumptable entries are emitted 2018-07-13 19:57:39 +00:00
Mem2Reg Improve ConvertDebugDeclareToDebugValue 2018-06-26 06:17:00 +00:00
MemCpyOpt Merge clang's isRepeatedBytePattern with LLVM's isBytewiseValue 2018-09-21 05:17:42 +00:00
MergeFunc [IR] Add a dedicated FNeg IR Instruction 2018-11-13 18:15:47 +00:00
MergeICmps [MergeICmps] Do not perform the transformation if GEP is used outside of block 2018-11-05 18:16:32 +00:00
MetaRenamer
NameAnonGlobals
NaryReassociate [NaryReassociate] Detect deleted instr with WeakVH 2018-05-24 06:09:02 +00:00
NewGVN [NewGVN] Make sure we do not add a user to itself. 2018-11-07 17:20:07 +00:00
ObjCARC [ObjCARC] Prevent code motion into a catchswitch 2018-05-16 04:52:18 +00:00
PGOProfile [PGO] Exit early if all count values are zero 2018-11-07 23:51:20 +00:00
PartiallyInlineLibCalls
PhaseOrdering [PhaseOrdering] remove stale comments; NFC 2018-05-09 23:10:46 +00:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH [PM][FunctionAttrs] add NoUnwind attribute inference to PostOrderFunctionAttrs pass 2018-03-23 21:46:16 +00:00
Reassociate [FPEnv] Convert more BinaryOperator::isFNeg(...) to m_FNeg(...) 2018-10-24 14:45:18 +00:00
Reg2Mem
RewriteStatepointsForGC NFC - Various typo fixes in tests 2018-07-04 13:28:39 +00:00
SCCP [IPSCCP,PM] Preserve PDT in the new pass manager. 2018-11-11 20:22:45 +00:00
SLPVectorizer [TTI] Reduction costs only need to include a single extract element cost 2018-11-15 17:42:53 +00:00
SROA [SROA] Use offset sizes from the DataLayout instead of the pointer siezes. 2018-10-30 11:15:04 +00:00
SafeStack SafeStack: Prevent OOB reads with mem intrinsics 2018-08-30 20:44:51 +00:00
SampleProfile Add a flag to remap manglings when reading profile data information. 2018-10-10 23:13:47 +00:00
ScalarizeMaskedMemIntrin/X86 [ScalarizeMaskedMemIntrin] Use MinAlign to calculate alignment for the scalar load/stores to handle element types that are byte-sized but not powers of 2. 2018-09-28 03:35:37 +00:00
Scalarizer [LoopVectorize] Loop vectorization for minimum and maximum 2018-10-19 21:11:43 +00:00
SeparateConstOffsetFromGEP [Split GEP] handle trunc() in separate-const-offset-from-gep pass. 2018-05-11 21:13:19 +00:00
SimpleLoopUnswitch [SimpleLoopUnswitch] adding cost multiplier to cap exponential unswitch with 2018-11-16 21:16:43 +00:00
SimplifyCFG Mark @llvm.trap cold 2018-11-14 19:53:41 +00:00
Sink
SpeculateAroundPHIs
SpeculativeExecution
StraightLineStrengthReduce [SLSR] use 'match' to simplify code; NFC 2018-10-23 14:07:39 +00:00
StripDeadPrototypes
StripSymbols
StructurizeCFG StructurizeCFG: Simplify inserted PHI nodes 2018-10-17 15:37:41 +00:00
SyntheticCountsPropagation
TailCallElim [TailCallElim] Enable marking of calls with byval as tails 2018-10-08 18:03:40 +00:00
ThinLTOBitcodeWriter [ThinLTOBitcodeWriter] Emit summaries for regular LTO modules 2018-06-01 15:20:47 +00:00
Util Relax trivial cast requirements in CallPromotionUtils 2018-10-10 16:35:47 +00:00
WholeProgramDevirt [ThinLTO] Efficiency fix for writing type id records in per-module indexes 2018-09-25 20:14:40 +00:00