llvm/lib/Transforms/Scalar
Joerg Sonnenberger 3d72b70842 Split the SimplifyCFG pass into two variants.
The first variant contains all current transformations except
transforming switches into lookup tables. The second variant
contains all current transformations.

The switch-to-lookup-table conversion results in code that is more
difficult to analyze and optimize by other passes. Most importantly,
it can inhibit Dead Code Elimination. As such it is often beneficial to
only apply this transformation very late. A common example is inlining,
which can often result in range restrictions for the switch expression.

Changes in execution time according to LNT:
SingleSource/Benchmarks/Misc/fp-convert +3.03%
MultiSource/Benchmarks/ASC_Sequoia/CrystalMk/CrystalMk -11.20%
MultiSource/Benchmarks/Olden/perimeter/perimeter -10.43%
and a couple of smaller changes. For perimeter it also results 2.6%
a smaller binary.

Differential Revision: https://reviews.llvm.org/D30333


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298799 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-26 06:44:08 +00:00
..
ADCE.cpp [ADCE] Remove redundent code [NFC] 2017-03-16 03:59:23 +00:00
AlignmentFromAssumptions.cpp [PH] Replace uses of AssertingVH from members of analysis results with 2017-01-24 12:55:57 +00:00
BDCE.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
CMakeLists.txt NVPTX: Move InferAddressSpaces to generic code 2017-01-31 01:10:58 +00:00
ConstantHoisting.cpp [Constant Hoisting] Avoid inserting instructions before EH pads 2017-03-01 22:41:12 +00:00
ConstantProp.cpp Don't remove side effecting instructions due to ConstantFoldInstruction 2016-07-22 04:54:44 +00:00
CorrelatedValuePropagation.cpp [IR] Make SwitchInst::CaseIt almost a normal iterator. 2017-03-26 02:49:23 +00:00
DCE.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
DeadStoreElimination.cpp [DeadStoreElimination] Check function modref behavior before considering memory clobbered 2017-03-01 14:38:29 +00:00
EarlyCSE.cpp TTI: Split IsSimple in MemIntrinsicInfo 2017-03-24 18:56:43 +00:00
FlattenCFGPass.cpp Scalar: Remove some implicit ilist iterator conversions, NFC 2015-10-13 18:26:00 +00:00
Float2Int.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
GuardWidening.cpp Add a wrapper around copy_if in STLExtras; NFC 2017-02-21 00:38:44 +00:00
GVN.cpp Templatize parts of VNCoercion, and add constant-only versions of the functions to be used in NewGVN. 2017-03-20 16:08:29 +00:00
GVNHoist.cpp Move defClobbersUseOrDef to being a protected member of a class since we don't want anyone else using it 2017-03-02 23:06:46 +00:00
InductiveRangeCheckElimination.cpp [IRCE] Add a missing invariant check 2017-02-07 23:59:07 +00:00
IndVarSimplify.cpp Use MutableArrayRef for APFloat::convertToInteger 2017-03-20 14:40:12 +00:00
InferAddressSpaces.cpp Bug 31948: Fix assertion when bitcasting constantexpr pointers 2017-02-17 00:32:19 +00:00
IVUsersPrinter.cpp [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
JumpThreading.cpp Correct a rebase mistake. 2017-03-19 15:41:46 +00:00
LICM.cpp Make default value for disable-licm-promotion in licm explicit. 2017-02-21 20:53:48 +00:00
LLVMBuild.txt Update libdeps in LLVMipo and LLVMScalarOpts, corresponding to r245940. 2015-08-25 17:11:17 +00:00
LoadCombine.cpp [LoadCombine] Fix combining of loads which span an aliasing store. 2017-02-09 21:46:49 +00:00
LoopAccessAnalysisPrinter.cpp [PM] Separate the LoopAnalysisManager from the LoopPassManager and move 2017-01-11 09:43:56 +00:00
LoopDataPrefetch.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
LoopDeletion.cpp [LoopDeletion] Modernize and simplify a bit. NFCI. 2017-02-26 07:08:20 +00:00
LoopDistribute.cpp Add a wrapper around copy_if in STLExtras; NFC 2017-02-21 00:38:44 +00:00
LoopIdiomRecognize.cpp [Analysis] Add LibFunc_ prefix to enums in TargetLibraryInfo. (NFC) 2017-01-23 23:16:46 +00:00
LoopInstSimplify.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
LoopInterchange.cpp Remove inclusion of SSAUpdater from several passes. 2017-01-29 01:55:24 +00:00
LoopLoadElimination.cpp Add a wrapper around copy_if in STLExtras; NFC 2017-02-21 00:38:44 +00:00
LoopPassManager.cpp [PM] Teach LoopUnroll to update the LPM infrastructure as it unrolls 2017-01-25 02:49:01 +00:00
LoopPredication.cpp Loop predication expand both sides of the widened condition 2017-02-27 15:44:49 +00:00
LoopRerollPass.cpp [LoopReroll] Make root-finding more aggressive. 2016-11-21 22:35:34 +00:00
LoopRotation.cpp [LoopRotate] Propagate dbg.value intrinsics 2017-03-08 09:56:22 +00:00
LoopSimplifyCFG.cpp [PM] Introduce an analysis set used to preserve all analyses over 2017-01-15 06:32:49 +00:00
LoopSink.cpp [PM] Port LoopSink to the new pass manager. 2017-01-20 08:42:19 +00:00
LoopStrengthReduce.cpp Set option enabling LSR alternative way to resolve complex solution to false. 2017-03-04 03:14:05 +00:00
LoopUnrollPass.cpp [LoopUnrolling] Re-prioritize Peeling and Partial unrolling 2017-03-03 18:19:10 +00:00
LoopUnswitch.cpp Only unswitch loops with uniform conditions 2017-03-17 17:13:41 +00:00
LoopVersioningLICM.cpp [LoopVersioning] Require loop-simplify form for loop versioning. 2016-12-19 17:13:37 +00:00
LowerAtomic.cpp [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
LowerExpectIntrinsic.cpp [Profile] handle select instruction in 'expect' lowering 2016-09-02 22:03:40 +00:00
LowerGuardIntrinsic.cpp [PM] Port LowerGuardIntrinsic to the new PM. 2016-07-28 22:08:41 +00:00
MemCpyOptimizer.cpp MemCpyOptimizer: don't create new addrspace casts 2017-03-14 22:37:38 +00:00
MergedLoadStoreMotion.cpp Remove inclusion of SSAUpdater from several passes. 2017-01-29 01:55:24 +00:00
NaryReassociate.cpp [PH] Replace uses of AssertingVH from members of analysis results with 2017-01-24 12:55:57 +00:00
NewGVN.cpp [NewGVN] Adjust NDEBUG markers. 2017-03-25 02:40:02 +00:00
PartiallyInlineLibCalls.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
PlaceSafepoints.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
Reassociate.cpp [Reassociate] Add negated value of negative constant to the Duplicates list. 2017-02-23 18:49:03 +00:00
Reg2Mem.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
RewriteStatepointsForGC.cpp Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
Scalar.cpp Split the SimplifyCFG pass into two variants. 2017-03-26 06:44:08 +00:00
Scalarizer.cpp Scalarizer: Support scalarizing intrinsics 2016-07-25 20:02:54 +00:00
SCCP.cpp [SCCP] Merge markOverdefined and markAnythingOverdefined. 2017-03-08 01:26:37 +00:00
SeparateConstOffsetFromGEP.cpp Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
SimplifyCFGPass.cpp Split the SimplifyCFG pass into two variants. 2017-03-26 06:44:08 +00:00
Sink.cpp Remove unnecessary IDom check 2017-03-20 00:30:19 +00:00
SpeculativeExecution.cpp SpeculativeExecution: Allow speculating more inst types 2016-10-28 20:00:33 +00:00
SROA.cpp Preserve nonnull metadata on Loads through SROA & mem2reg. 2017-03-22 19:16:39 +00:00
StraightLineStrengthReduce.cpp IR: Change the gep_type_iterator API to avoid always exposing the "current" type. 2016-12-02 02:24:42 +00:00
StructurizeCFG.cpp [StructurizeCfg] Update dominator info. 2017-01-10 02:50:47 +00:00
TailRecursionElimination.cpp [TRE] Remove dead code 2016-11-07 22:17:37 +00:00