<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 18, 2016, at 2:28 PM, Xinliang David Li <<a href="mailto:davidxl@google.com" class="">davidxl@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Apr 18, 2016 at 2:18 PM, Chandler Carruth <span dir="ltr" class=""><<a href="mailto:chandlerc@gmail.com" target="_blank" class="">chandlerc@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">The difference between Analysis and Transforms is *not* about passes, but about what the code *does*.<div class=""><br class=""></div><div class="">Code for mutating the IR should be in Transforms, and code that analyzes the IR without mutating it should be in Analysis. This is why, for example, InstructionSimplify is in Analysis -- it does not mutate the IR in any way.</div><div class=""><br class=""></div><div class="">So I think InlineCost and similar things should stay in the Analysis library regardless of whether they are passes or not.</div></div></blockquote><div class=""><br class=""></div><div class="">Is that the only criteria (IR mod or not) ? Most of the transformations have pass specific analysis (that are not shared with other clients) -- those code stay with the transformation -- it does not make sense to move those code in to Analysis. For the same reason, we need to ask first if InlineCost is intended to be a shared utility?</div></div></div></div></div></blockquote><div><br class=""></div><div>In the current case at stake: the issue is that we can't make the Analysis library using anything from the ProfileData library. Conceptually there is a problem IMO.</div><div><br class=""></div><div>Moving something from Analysis to TransformUtils just because it needs to access ProfileData is a slippery slope...</div><div><br class=""></div><div>-- </div><div>Mehdi</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class="">David</div><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><div class="h5"><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Apr 18, 2016 at 2:14 PM Mehdi Amini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
> On Apr 18, 2016, at 2:07 PM, Hal Finkel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class="">
><br class="">
> ----- Original Message -----<br class="">
>> From: "Easwaran Raman" <<a href="mailto:eraman@google.com" target="_blank" class="">eraman@google.com</a>><br class="">
>> To: "via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>><br class="">
>> Cc: "Chandler Carruth" <<a href="mailto:chandlerc@gmail.com" target="_blank" class="">chandlerc@gmail.com</a>>, "Hal Finkel" <<a href="mailto:hfinkel@anl.gov" target="_blank" class="">hfinkel@anl.gov</a>>, "Philip Reames"<br class="">
>> <<a href="mailto:listmail@philipreames.com" target="_blank" class="">listmail@philipreames.com</a>>, "David Li" <<a href="mailto:davidxl@google.com" target="_blank" class="">davidxl@google.com</a>><br class="">
>> Sent: Monday, April 18, 2016 2:39:49 PM<br class="">
>> Subject: Move InlineCost.cpp out of Analysis?<br class="">
>><br class="">
>><br class="">
>> Hi,<br class="">
>><br class="">
>><br class="">
>> After r256521 - which removes InlineCostAnalysis class - I think<br class="">
>> there is no strong reason for InlineCost.cpp to be part of the<br class="">
>> Analysis library. Is it fine to make it part of TransformUtils?<br class="">
>><br class="">
><br class="">
> Given that InlineCost is not really an analysis any longer, I think this is fine.<br class="">
<br class="">
Isn't it? It is not a pass, but I see it as an analysis utils.<br class="">
<br class="">
><br class="">
>><br class="">
>> I submitted r266477 (which has now been reverted) that made Analysis<br class="">
>> depend on ProfileData in order to obtain ProfileSummary for the<br class="">
>> module, but there is an existing dependency of ProfileData on<br class="">
>> Analysis (through Object and BitCode).<br class="">
<br class="">
The real issue is that BitCode depends on Analysis I think.<br class="">
I'm not sure about ProfileData that depends on Bitcode, do you know why?<br class="">
<br class="">
--<br class="">
Mehdi<br class="">
<br class="">
<br class="">
>> Moving InlineCost.cpp under<br class="">
>> Transforms/Utils will fix this issue. There are other ways to fix<br class="">
>> this (make Inliner.cpp get the ProfileSummary and pass it to<br class="">
>> InlineCost, for example), but I think it makes sense to move<br class="">
>> InlineCost.<br class="">
>><br class="">
>><br class="">
>> Thoughts?<br class="">
>><br class="">
>><br class="">
>> Thanks,<br class="">
>> Easwaran<br class="">
>><br class="">
>><br class="">
><br class="">
> --<br class="">
> Hal Finkel<br class="">
> Assistant Computational Scientist<br class="">
> Leadership Computing Facility<br class="">
> Argonne National Laboratory<br class="">
> _______________________________________________<br class="">
> LLVM Developers mailing list<br class="">
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
<br class="">
_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
</blockquote></div></div></div></div></div>
</blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>