<div dir="ltr">Ping!</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 9, 2018 at 2:46 PM, Bhatu <span dir="ltr"><<a href="mailto:cs12b1010@iith.ac.in" target="_blank">cs12b1010@iith.ac.in</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>If we add multiple loop passes to the pass manager in PassManagerBuilder.cpp consecutively without any func/module pass in between, I used to think they would belong to the same loop pass manager. But it does not seem to be the case.</div><div><br></div><div>For example for this code snippet</div><div><div><font face="monospace, monospace"> PM.add(<wbr>createIndVarSimplifyPass()); // Canonicalize indvars</font></div><div><font face="monospace, monospace"> MPM.add(createLoopIdiomPass())<wbr>; // Recognize idioms like memset.</font></div><div><font face="monospace, monospace"> addExtensionsToPM(EP_<wbr>LateLoopOptimizations, MPM);</font></div><div><font face="monospace, monospace"> MPM.add(<wbr>createLoopDeletionPass()); // Delete dead loops</font></div></div><div><font face="monospace, monospace">..</font></div><div><font face="monospace, monospace"><div> if (!DisableUnrollLoops)</div><div> MPM.add(<wbr>createSimpleLoopUnrollPass(<wbr>OptLevel)); // Unroll small loops</div></font></div><div><br></div><div>I see -debug-pass=Structure output:</div><div><div><div> Scalar Evolution Analysis</div><div> Loop Pass Manager</div><div> Induction Variable Simplification</div><div> Recognize loop idioms</div><div> Delete dead loops</div><div> Unroll loops</div><div> MergedLoadStoreMotion</div></div><div><br></div><div>Which is in line to what I thought. However for this code snippet:</div><div><div> <font face="monospace, monospace"> if (EnableUnrollAndJam) {</font></div><div><font face="monospace, monospace"> // Unroll and Jam. We do this before unroll but need to be in a separate</font></div><div><font face="monospace, monospace"> // loop pass manager in order for the outer loop to be processed by</font></div><div><font face="monospace, monospace"> // unroll and jam before the inner loop is unrolled.</font></div><div><font face="monospace, monospace"> MPM.add(<wbr>createLoopUnrollAndJamPass(<wbr>OptLevel));</font></div><div><font face="monospace, monospace"> }</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"> MPM.add(createLoopUnrollPass(<wbr>OptLevel)); // Unroll small loops</font></div></div><div><br></div><div>I see:</div><div><div> Loop-Closed SSA Form Pass</div><div> Loop Pass Manager</div><div> Unroll and Jam loops</div><div> Loop Pass Manager</div><div> Unroll loops</div><div> Lazy Branch Probability Analysis</div></div><div><br></div><div>Here two different loop pass managers were created. What is the difference in between these two cases? How was the loop pass manager split up in the second case? </div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br><div class="m_-3964983238490490082gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="1"><span style="color:rgb(84,141,212);font-family:arial,helvetica,sans-serif">Regards</span><br></font></div><div><div dir="ltr"><font color="#000000" face="arial, helvetica, sans-serif" size="1"><font color="#548dd4">Bhatu</font></font></div></div></div></div></div></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font size="1"><span style="color:rgb(84,141,212);font-family:arial,helvetica,sans-serif">Regards</span><br></font></div><div><div dir="ltr"><font color="#000000 " face="arial, helvetica, sans-serif" size="1"><font color="#548dd4">Bhatu</font></font></div></div></div></div></div></div></div></div></div></div>
</div>