mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[LICM] Refactoring + Improvements + Exclusivity Support
Major refactoring + tuning of LICM. Includes: Support for hosting more array semantic calls Remove restrictions for sinking instructions Add support for hoisting and sinking instruction pairs (begin and end accesses) Testing with Exclusivity enabled on a couple of benchmarks shows: ReversedArray 7x improvement StringWalk 2.6x improvement
This commit is contained in:
@@ -193,7 +193,12 @@ void addHighLevelLoopOptPasses(SILPassPipelinePlan &P) {
|
||||
P.addHighLevelCSE();
|
||||
P.addSILCombine();
|
||||
P.addSimplifyCFG();
|
||||
// Optimize access markers for better LICM: might merge accesses
|
||||
// It will also set the no_nested_conflict for dynamic accesses
|
||||
P.addAccessEnforcementOpts();
|
||||
P.addHighLevelLICM();
|
||||
// Simplify CFG after LICM that creates new exit blocks
|
||||
P.addSimplifyCFG();
|
||||
// Start of loop unrolling passes.
|
||||
P.addArrayCountPropagation();
|
||||
// To simplify induction variable.
|
||||
@@ -446,7 +451,12 @@ static void addLateLoopOptPassPipeline(SILPassPipelinePlan &P) {
|
||||
|
||||
// Perform the final lowering transformations.
|
||||
P.addCodeSinking();
|
||||
// Optimize access markers for better LICM: might merge accesses
|
||||
// It will also set the no_nested_conflict for dynamic accesses
|
||||
P.addAccessEnforcementOpts();
|
||||
P.addLICM();
|
||||
// Simplify CFG after LICM that creates new exit blocks
|
||||
P.addSimplifyCFG();
|
||||
|
||||
// Optimize overflow checks.
|
||||
P.addRedundantOverflowCheckRemoval();
|
||||
|
||||
Reference in New Issue
Block a user