[llvm-dev] Fwd: bugpoint can't automatically select a safe interpreter!

Justin Bogner via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 22 08:43:57 PDT 2019


Jay Foad via llvm-dev <llvm-dev at lists.llvm.org> writes:
> I tried to reduce the test case in
> https://bugs.llvm.org/show_bug.cgi?id=42706. Here it is crashing opt:
>
> $ ~/llvm-debug/bin/opt -use-gpu-divergence-analysis -divergence stripped.ll
> WARNING: You're attempting to print out a bitcode file.
> This is inadvisable as it may cause display problems. If
> you REALLY want to taste LLVM bitcode first-hand, you
> can force output with the `-f' option.
>
> opt:
> /home/jayfoad2/git/llvm-project/llvm/lib/Analysis/SyncDependenceAnalysis.cpp:312:
> std::unique_ptr<ConstBlockSet>
> llvm::DivergencePropagator::computeJoinPoints(const llvm::BasicBlock
> &, SuccessorIterable, const llvm::Loop *, const llvm::BasicBlock *)
> [SuccessorIterable = llvm::iterator_range<llvm::SuccIterator<const
> llvm::Instruction, const llvm::BasicBlock> >]: Assertion
> `HeaderDefBlock && "no definition in header of carrying loop"' failed.
 ...
> Aborted (core dumped)
>
> But if I try the same thing with bugpoint I get:
>
> $ ~/llvm-debug/bin/bugpoint -use-gpu-divergence-analysis -divergence stripped.ll
> Read input file      : 'stripped.ll'
> *** All input ok
> Running selected passes on program to test for crash: Success!
> Initializing execution environment: Found lli: /home/jayfoad2/llvm-debug/bin/lli
> Sorry, I can't automatically select a safe interpreter!
>
> Exiting.
>
> What does this mean? What is a "safe interpreter", and why does
> bugpoint think it needs one in order to try to reduce the test case?

Bugpoint's user interface is notoriously complex. I'm not sure why it's
going the safe interpreter route instead of reducing the crash, but I'd
recommend trying the custom scripts approach in this article for
reducing something like this:

    http://blog.llvm.org/2015/11/reduce-your-testcases-with-bugpoint-and.html

It avoids some of bugpoint's magic, so it tends to be easier to get what
you want.

> The documentation for bugpoint suggests that it will only try to use a
> "safe backend" if none of the passes specified on the command line
> crash.
>
> Jay.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list