[llvm-dev] bugpoint --tool-args and --safe-tool-args

Friedman, Eli via llvm-dev
2018-07-31T18:03:48Z

On 7/31/2018 10:10 AM, David Greene via llvm-dev wrote:
> I have a failing test and bugpoint would be the perfect tool to help
> narrow it down.
>
> llc is the failing tool.  It fails with one set of options and passes
> with another.  I was hoping to use bugpoint like this:
>
> bugpoint -safe-llc -run-llc <testcase> -tool-args <failing
args> -safe-tool-args <passing args>
>
> Unfortunately, this doesn't seem to be possible.  According to the
> documentation both -tool-args and -safe-tool-args consume all remaining
> arguments so bugpoint would never see -safe-tool-args above.
>
> I tried it and indeed it looks like -safe-tool-args never makes it to
> llc.
>
> For now I can build another llc which makes <failing args> default
and
> then just use -safe-tool-args above but it's a bit painful.
>
> Has anyone tried to use bugpoint like this before?  Any tips?

I've occasionally used shell script wrappers when I couldn't get
bugpoint command-line parsing to work the way I wanted it to.

Looking at CommandLine.rst, PositionalEatsArgs is supposed to allow
specifying something like the command you wrote, but I'm not sure it
ever worked correctly; nothing other than bugpoint uses it, as far as I
can tell.

-Eli

--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux
Foundation Collaborative Project