diff options
| author | Dehao Chen <dehao@google.com> | 2016-11-10 17:42:18 +0000 |
|---|---|---|
| committer | Dehao Chen <dehao@google.com> | 2016-11-10 17:42:18 +0000 |
| commit | 5492f8646c0b8cac08cb6c06c66835e73a00a256 (patch) | |
| tree | 3cf7b0c035e601577bd9fd4ee010aef4793f5df4 | |
| parent | b92cfe68044ecbde49562b99d4e11b92fb386a91 (diff) | |
| download | bcm5719-llvm-5492f8646c0b8cac08cb6c06c66835e73a00a256.tar.gz bcm5719-llvm-5492f8646c0b8cac08cb6c06c66835e73a00a256.zip | |
Add comments about why we put LoopSink pass at the very late stage.
llvm-svn: 286480
| -rw-r--r-- | llvm/lib/Transforms/IPO/PassManagerBuilder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index c340da4a2b2..1caa591f587 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -647,6 +647,10 @@ void PassManagerBuilder::populateModulePassManager( if (MergeFunctions) MPM.add(createMergeFunctionsPass()); + // LoopSink pass sinks instructions hoisted by LICM, which serves as a + // canonicalization pass that enables other optimizations. As a result, + // LoopSink pass needs to be a very late IR pass to avoid undoing LICM + // result too early. MPM.add(createLoopSinkPass()); // Get rid of LCSSA nodes. MPM.add(createInstructionSimplifierPass()); |

