diff options
| author | Joerg Sonnenberger <joerg@bec.de> | 2017-03-26 06:44:08 +0000 |
|---|---|---|
| committer | Joerg Sonnenberger <joerg@bec.de> | 2017-03-26 06:44:08 +0000 |
| commit | fa7367428ae39271e5a2f2554f7c607d9b07a5c8 (patch) | |
| tree | 37c22b56029296478df1daa63e1a722fe38ea1ab /llvm/lib/Transforms/IPO | |
| parent | ebfe3a9df822b6e23dd7f942f648a27da6cf75be (diff) | |
| download | bcm5719-llvm-fa7367428ae39271e5a2f2554f7c607d9b07a5c8.tar.gz bcm5719-llvm-fa7367428ae39271e5a2f2554f7c607d9b07a5c8.zip | |
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
llvm-svn: 298799
Diffstat (limited to 'llvm/lib/Transforms/IPO')
| -rw-r--r-- | llvm/lib/Transforms/IPO/PassManagerBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index b07b7d1b5ff..b9336099c7a 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -631,7 +631,7 @@ void PassManagerBuilder::populateModulePassManager( } addExtensionsToPM(EP_Peephole, MPM); - MPM.add(createCFGSimplificationPass()); + MPM.add(createLateCFGSimplificationPass()); // Switches to lookup tables addInstructionCombiningPass(MPM); if (!DisableUnrollLoops) { |

