<div dir="ltr"><br><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 2:49 PM Mehdi AMINI <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for review, that was quick :)<br>
<br>
<br></blockquote><div><br></div><div>Sure :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
REPOSITORY<br>
  rL LLVM<br>
<br>
================<br>
Comment at: lib/Analysis/Lint.cpp:178<br>
@@ -177,3 +176,2 @@<br>
   DT = &getAnalysis<<u></u>DominatorTreeWrapperPass>().<u></u>getDomTree();<br>
-  DL = &F.getParent()->getDataLayout(<u></u>);<br>
   TLI = &getAnalysis<<u></u>TargetLibraryInfoWrapperPass>(<u></u>).getTLI();<br>
----------------<br>
echristo wrote:<br>
> Any reason not to leave it cached instead of passing it down?<br>
In short: cannot rebind a reference and I wanted to get rid of the pointer.<br>
<br></blockquote><div><br></div><div><span style="font-size:13.1999998092651px">Ah, sure.</span></div><div><span style="font-size:13.1999998092651px"> </span><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It plays well with passes that initialize a separate transient object to do the processing, but not with passes that do their processing "in-place". Because passes object are not transient, they carry their state between runs, including a potential obsolete DL pointer.<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Not sure if I was clear?<br>
<br></blockquote><div><br></div><div>Assuming in the case of "things that work on multiple modules". Otherwise, something that just runs on a single module should be able to cache it with no problem right? :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This was very case-by-case, and I may have get it wrong here and there (I mean wrong in the sense that a function argument could have been save by retrieving the DL differently, I don't think I broke correctness).<br>
<br></blockquote><div><br></div><div>Right. Should be ok.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
================<br>
Comment at: lib/Analysis/<u></u>LoopAccessAnalysis.cpp:292<br>
@@ -291,2 +291,3 @@<br>
       if (hasComputableBounds(SE, StridesMap, Ptr) &&<br>
-          // When we run after a failing dependency check we have to make sure we<br>
+          // When we run after a failing dependency check we have to make sure<br>
+          // we<br>
----------------<br>
echristo wrote:<br>
> Formatting. :)<br>
That was clang-format, it probably gets over 80 lines without the line break. I'll rephrase the comment to save what is needed to fit in the line.<br>
<br></blockquote><div><br></div><div>Yep. Figured, it does that to me all the time, just calling it out.</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://reviews.llvm.org/D8158" target="_blank">http://reviews.llvm.org/D8158</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
<br>
<br>
</blockquote></div></div>