[PATCH] D33804: bugpoint: Prototype disabling symbolication of bugpoint-executed programs

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 15:01:14 PDT 2017


dblaikie created this revision.

This shows the basic idea, using command line arguments. Further work
would be done to plumb through the argument to other tools (llc, lli).

This wouldn't handle things like external scripts (bugpoint's
-compile-command feature) which would need to explicitly opt-in by
passing the argument to any LLVM tools they invoke to avoid the
performance penalty of symbolication.

Alternatively (as suggested by chandlerc@) an environment variable would
be used. This would allow the option to pass transparently through user
scripts, pass to compilers if they happened to be LLVM-ish, etc.

I worry a bit about using cl::opt in the crash handling code - LLVM
might crash early, perhaps before the cl::opt is properly initialized?
Or at least before arguments have been parsed?

I shyed away from doing this with an environment variable when I
realized that would require copying the existing environment and
appending the env variable of interest. But it seems there's no existing
LLVM API for accessing the environment (even the Support tests for
process launching have their own ifdefs for getting the environment). It
could be added, but seemed like a higher bar/untested codepath to
actually add environment variables.

Anyway - so looking for folks thoughts/preferences/etc. This change as
is does fix the original issue I came across, with this change
test/BugPoint/metadata.ll goes from 1m34s to 6.5s (& I think it hits all
the other bugpoint tests too - so I guess they don't have loads of
coverage on the different programs that can be executed, etc)


https://reviews.llvm.org/D33804

Files:
  lib/Support/Signals.cpp
  tools/bugpoint/OptimizerDriver.cpp
  tools/bugpoint/ToolRunner.cpp
  tools/bugpoint/ToolRunner.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33804.101121.patch
Type: text/x-patch
Size: 3955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170601/7fdce6cd/attachment.bin>


More information about the llvm-commits mailing list