<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 10, 2015 at 8:44 AM, Diego Novillo <span dir="ltr"><<a href="mailto:dnovillo@google.com" target="_blank">dnovillo@google.com</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"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Jun 10, 2015 at 2:47 AM, David <span dir="ltr"><<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">================<br>
Comment at: include/llvm/Analysis/BlockFrequencyInfoImpl.h:1057<br>
@@ -1045,1 +1056,3 @@<br>
+<br>
+    adjustLoopHeaderMass(Loop);<br>
   } else {<br>
----------------<br>
Should this be done iteratively? The mass propagation before this call is based on wrong initial masses for loop headers.<br></blockquote><div><br></div></span><div>Yeah, iterating a fixed number of times here would give us a better approximation. I was thinking of tuning this after the initial fix.</div></div></div></div></blockquote><div><br></div><div>Ok.  Ideally, to also address Duncan's concern about not considering incoming edge when computing header nodes mass distribution (which can skew the results for short trip counted irreducible loops), the iterative algorithm should be done in the context of the parent loop of the irreducible loop. If a loop contains a irreducible child loop, its mass computation needs to be iterative: the subloop needs to be unpackaged and the mass computation results of the parent loop from previous iteration can be used to initialize the masses of the subloop's header nodes .. Not sure if it is important to handle this in reality -- we can deal with later when needed.</div><div><br></div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="HOEnZb"><font color="#888888"><div><br></div><div>Diego.</div></font></span></div></div></div>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div></div>