forked from OSchip/llvm-project
Add comments about why we put LoopSink pass at the very late stage.
llvm-svn: 286480
This commit is contained in:
parent
b92cfe6804
commit
5492f8646c
|
@ -647,6 +647,10 @@ void PassManagerBuilder::populateModulePassManager(
|
||||||
if (MergeFunctions)
|
if (MergeFunctions)
|
||||||
MPM.add(createMergeFunctionsPass());
|
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());
|
MPM.add(createLoopSinkPass());
|
||||||
// Get rid of LCSSA nodes.
|
// Get rid of LCSSA nodes.
|
||||||
MPM.add(createInstructionSimplifierPass());
|
MPM.add(createInstructionSimplifierPass());
|
||||||
|
|
Loading…
Reference in New Issue