<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Jun 13, 2018 at 8:03 PM David A. Greene via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fedor Sergeev <<a href="mailto:fedor.sergeev@azul.com" target="_blank">fedor.sergeev@azul.com</a>> writes:<br>
<br>
>> Ok.  The way I envision this working from a user standpoint is<br>
>> -opt-bisect-limit <n> would mean "n applications of code<br>
>> transformation." where "code transformation" could mean an entire pass<br>
>> run or individual transforms within a pass.  Each pass would decide what<br>
>> it supports.<br>
> I would rather not merge pass-execution and in-pass-transformation<br>
> numbers into a single number.<br>
> It will only confuse users on what is being controlled.<br>
> Especially as in-pass control is going to be opt-in only.<br>
<br>
Oh, ok.  I'm fine with that too.  Do we want this finer-grained control<br>
on a global basis, or a per-pass basis?  For example, should something<br>
like -transform-max=<n> apply over the whole compilation run, so that<br>
every pass checks the limit, or should it work like<br>
-transform-max=<pass>=<n>, where only pass <pass> checks the limit?  If<br>
the latter, then -opt-bisect-limit (or bugpoint) can identify the pass<br>
and another run with -transform-max can identify the specific transform<br>
within the pass.<br></blockquote><div>This seems to be pretty much orthogonal to the pass manager instrumentation. In fact, there is nothing keeping you from implementing this for your pass right now using debug counters. That's mostly their job, and they are independent of the pass manager implementation.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The latter is how we have things set up here and it seems to work well,<br>
but I can also see utility in a global limit because then you don't need<br>
two separate runs to isolate the problem.<br>
<br>
I'd like to start building this off the pass instrumentation stuff as<br>
soon as it gets integrated.  Could you copy me on Phabricator when they<br>
land there?  Thanks!<br>
<br>
>> The harder cases are where the analysis phase itself does some<br>
>> transformation (possily to facilitate analysis) and then decides the<br>
> As Philip has already pointed out, analyses by design are expected to<br>
> be non-mutating.<br>
<br>
See my reply to Philip.  I'm talking about various analyses that happen<br>
within transformation passes.</blockquote><div>I see, then I just misunderstood what you meant by analysis. I believe what you were going here for can as well be implemented on top of debug counters.</div><div><br></div><div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br class="gmail-Apple-interchange-newline">Cheers,</div><div style="background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Philip</div><br class="gmail-Apple-interchange-newline"><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                               -David<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<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><br>
</blockquote></div></div>