May 2015
Intermediate to advanced
296 pages
5h 10m
English
In this recipe, you will learn about a useful tool provided by LLVM infrastructure, known as bugpoint. Bugpoint allows us to narrow down the source of problems in the LLVM's tools and passes. It is helpful in debugging optimizer crashes, miscompilations by optimizers, or bad native code generation. Using this, we can get a small test case for our problem and work on that.
You need to build and install LLVM.
Perform the following steps:
$ cat crash-narrowfunctiontest.ll define i32 @foo() { ret i32 1 } define i32 @test() { call i32 @test() ret i32 %1 } define i32 @bar() { ret i32 2 }
$ bugpoint -load path-to-llvm/build/./lib/BugpointPasses.so ...Read now
Unlock full access