<div dir="ltr">Ping</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jun 1, 2017 at 3:01 PM David Blaikie via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@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">dblaikie created this revision.<br>
<br>
This shows the basic idea, using command line arguments. Further work<br>
would be done to plumb through the argument to other tools (llc, lli).<br>
<br>
This wouldn't handle things like external scripts (bugpoint's<br>
-compile-command feature) which would need to explicitly opt-in by<br>
passing the argument to any LLVM tools they invoke to avoid the<br>
performance penalty of symbolication.<br>
<br>
Alternatively (as suggested by chandlerc@) an environment variable would<br>
be used. This would allow the option to pass transparently through user<br>
scripts, pass to compilers if they happened to be LLVM-ish, etc.<br>
<br>
I worry a bit about using cl::opt in the crash handling code - LLVM<br>
might crash early, perhaps before the cl::opt is properly initialized?<br>
Or at least before arguments have been parsed?<br>
<br>
I shyed away from doing this with an environment variable when I<br>
realized that would require copying the existing environment and<br>
appending the env variable of interest. But it seems there's no existing<br>
LLVM API for accessing the environment (even the Support tests for<br>
process launching have their own ifdefs for getting the environment). It<br>
could be added, but seemed like a higher bar/untested codepath to<br>
actually add environment variables.<br>
<br>
Anyway - so looking for folks thoughts/preferences/etc. This change as<br>
is does fix the original issue I came across, with this change<br>
test/BugPoint/metadata.ll goes from 1m34s to 6.5s (& I think it hits all<br>
the other bugpoint tests too - so I guess they don't have loads of<br>
coverage on the different programs that can be executed, etc)<br>
<br>
<br>
<a href="https://reviews.llvm.org/D33804" rel="noreferrer" target="_blank">https://reviews.llvm.org/D33804</a><br>
<br>
Files:<br>
  lib/Support/Signals.cpp<br>
  tools/bugpoint/OptimizerDriver.cpp<br>
  tools/bugpoint/ToolRunner.cpp<br>
  tools/bugpoint/ToolRunner.h<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>