<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 7/13/20 6:39 PM, Arthur Eubanks via
llvm-dev wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAPW48sqbX7f2TV93OyEohCjVEcpbo0BRExKb+p0AoatyuBCzdw@mail.gmail.com">
<div dir="ltr">
<div>opt has a flag -analyze which prints some debug information
for analyses that are run. This is done via Pass::print()
within the pass manager.</div>
<div><br>
</div>
<div>This isn't implemented in NPM and since NPM is not so much
into subclassing, it's a bit awkward (but somewhat doable) to
implement. Probably a better alternative is to separate out
the debug printing into a flag, or into another pass. For
example, some tests in Analysis/RegionInfo run `opt -regions
-analyze` for LPM, and `opt -passes='print<regions>'` to
test under NPM.</div>
<div><br>
</div>
<div>This is responsible for a significant amount of the
remaining <a href="https://bugs.llvm.org/show_bug.cgi?id=46651" moz-do-not-send="true">check-llvm failures under NPM</a>.
I'd like to deprecate -analyze and migrate passes to either
use a separate flag or pass to print extra info. Any comments?</div>
</div>
</blockquote>
<p><br>
</p>
<p>I think that, whatever the mechanism, we should make it uniform
across the passes. print<regions>, print<scev>,
print<cost-model> (or whatever) seems fine to me.</p>
<p> -Hal<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:CAPW48sqbX7f2TV93OyEohCjVEcpbo0BRExKb+p0AoatyuBCzdw@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<div>One tricky part about this is the existence of
update_analyze_test_checks.py. It uses some of the logs
printed (per function) by the -analyze infra to help with
updating CHECK lines. This is only used in ScalarEvolution and
CostModel tests. If we decide to separate out the -analyze
printing for those passes into a separate flag/pass, we could
make those two passes mimic -analyze's logging to continue
being able to use update_analyze_test_checks.py if that's
really wanted.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>