[llvm-dev] a stack dump in llvm pass (LLVM 3.7.0)

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 28 21:13:43 PDT 2015

On 28 October 2015 at 20:51, Q Z via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> then I got a stack dump finally.why? could somebody help me?

The first step is to make sure you're compiling against a debug-mode
LLVM (with assertions enabled!) and actually attach a debugger.

The "dump" method prints out any IR Value and is often *very* useful
for working out where you've made an incorrect assumption in your
pass. In gdb you'd write something like "p Val->dump()" and hope for
some insight.

Your outline looks vaguely sane but by its own comments omits the
problematic section: "// the problem is here". Even a hypothetically
sane clairvoyant would struggle with that kind of delegation.


More information about the llvm-dev mailing list