[PATCH] D66832: [Bugpoint][CrashDebugger] Add --same-error to skip non-relevant CodeGenCrash
Jinsong Ji via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 10:44:30 PDT 2019
jsji added a comment.
Thanks @vsk for the valuable comments.
In D66832#1664105 <https://reviews.llvm.org/D66832#1664105>, @vsk wrote:
> I think you've identified a real, pernicious problem, but am not sure that this is the best approach for addressing it. One potential problem here is that slight variations in the error message can confuse the reducer. If e.g. some location information changes in between messages, the reduction will stop too early.
>
> Maybe we need better documentation/examples about how to write check scripts that validate the error message?
Yes, you are absolutely right!
In some complex cases, the change might looks trivial, eg: location information, or call stack change.
And, yes, we should be able to use -custom-command and write a simple script to validate.
eg, for the testcase in `llvm/test/BugPoint/crash-sameerror.ll`, we should be able to use a custom-command line like:
$ cat t1.sh
#!/bin/bash
!(llc < $1 2>&1|grep "LLVM ERROR: Cannot select: intrinsic %llvm.ppc.altivec.dss" )
$ bugpoint -compile-custom -compile-command ./t1.sh t.ll
I think the major point of this patch is to **make it easier for beginners, for common scenarios**:
for most simple code gen crash, we can simply use follow command to reduce the testcases.
$ bugpoint --llc-safe t.ll -same-error
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66832/new/
https://reviews.llvm.org/D66832
More information about the llvm-commits
mailing list