[llvm] r286480 - Add comments about why we put LoopSink pass at the very late stage.
Dehao Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 09:42:18 PST 2016
Author: dehao
Date: Thu Nov 10 11:42:18 2016
New Revision: 286480
URL: http://llvm.org/viewvc/llvm-project?rev=286480&view=rev
Log:
Add comments about why we put LoopSink pass at the very late stage.
Modified:
llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=286480&r1=286479&r2=286480&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Thu Nov 10 11:42:18 2016
@@ -647,6 +647,10 @@ void PassManagerBuilder::populateModuleP
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());
More information about the llvm-commits
mailing list