<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 18, 2016 at 2:28 PM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Apr 18, 2016, at 2:24 PM, Easwaran Raman <<a href="mailto:eraman@google.com" target="_blank">eraman@google.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Thanks for the comments.<br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 18, 2016 at 2:13 PM, Mehdi Amini<span> </span><span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><br>> On Apr 18, 2016, at 2:07 PM, Hal Finkel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br><span>><br>> ----- Original Message -----<br>>> From: "Easwaran Raman" <<a href="mailto:eraman@google.com" target="_blank">eraman@google.com</a>><br>>> To: "via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>>> Cc: "Chandler Carruth" <<a href="mailto:chandlerc@gmail.com" target="_blank">chandlerc@gmail.com</a>>, "Hal Finkel" <<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>>, "Philip Reames"<br>>> <<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>>, "David Li" <<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>><br>>> Sent: Monday, April 18, 2016 2:39:49 PM<br>>> Subject: Move InlineCost.cpp out of Analysis?<br>>><br>>><br>>> Hi,<br>>><br>>><br>>> After r256521 - which removes InlineCostAnalysis class - I think<br>>> there is no strong reason for InlineCost.cpp to be part of the<br>>> Analysis library. Is it fine to make it part of TransformUtils?<br>>><br>><br></span>> Given that InlineCost is not really an analysis any longer, I think this is fine.<br><br>Isn't it? It is not a pass, but I see it as an analysis utils.<br></blockquote><div>Yes, I meant that it is not an analysis pass. It does perform analysis. I see one such example of something that performs analysis being added under Transforms/Utils: CmpInstAnalysis.cpp.</div></div></div></div></div></blockquote><div><br></div></span><div>If CmpInstAnalysis.cpp is not mutating the IR, it shouldn't sit here in my opinion.</div><span class=""><div><br></div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span><br>><br>>><br>>> I submitted r266477 (which has now been reverted) that made Analysis<br>>> depend on ProfileData in order to obtain ProfileSummary for the<br>>> module, but there is an existing dependency of ProfileData on<br>>> Analysis (through Object and BitCode).<br><br></span>The real issue is that BitCode depends on Analysis I think.<br></blockquote><div>I think that is due to ThinLTO's use of  getBlockProfileCount.</div></div></div></div></div></blockquote><div><br></div></span><div>Yeah, I know but we should find a way to break this...</div><span class=""><div><br></div><div><br></div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I'm not sure about ProfileData that depends on Bitcode, do you know why?<br></blockquote><div>ProfileData (specifically CoverageMapping{Reader|Writer}) depends on Object which depends on Bitcode.</div></div></div></div></div></blockquote><div><br></div></span><div>Some refactoring or split could help here, this does not seem desirable to me.</div></div></div></blockquote><div>Does moving the CoverageMapping code to a Coverage library seems reasonable? The rest of ProfileData does not depend on this or on Object and thgis would break the ProfileData->Analysis dependence.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span class=""><div><br></div><div>-- </div><div>Mehdi</div><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div><br></div><div><br><br>>> Moving InlineCost.cpp under<br>>> Transforms/Utils will fix this issue. There are other ways to fix<br>>> this (make Inliner.cpp get the ProfileSummary and pass it to<br>>> InlineCost, for example), but I think it makes sense to move<br>>> InlineCost.<br>>><br>>><br>>> Thoughts?<br>>><br>>><br>>> Thanks,<br>>> Easwaran<br>>><br>>><br>><br></div></div><span><font color="#888888">> --<br>> Hal Finkel<br>> Assistant Computational Scientist<br>> Leadership Computing Facility<br>> Argonne National Laboratory<br>> _______________________________________________<br>> LLVM Developers mailing list<br>><span> </span><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>><span> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></font></span></blockquote></div></div></div></div></blockquote></span></div><br></div></blockquote></div><br></div></div>