I would like to use bugpoint to debug some of my passes. I have read the documentation, but I don't completely understand it. I have a bitcode file X.bc that I transform using the following commands: opt -mypass1 -f -o X.1.bc X.bc // transform with mypass1 llvm-link -f -o X.2.bc X.1.bc support.bc // link with support.bc opt -mypass2 -f -o X.3.bc X.2.bc // transform with mypass2 After transforming X.bc into X.3.bc, if my passes work then I can run X.3.bc with llc using the following command: llc X.3.bc arg1 arg2 That llc command is currently seg faulting because of a bug in one of my passes or in support.bc. Can I use bugpoint to find a smaller version of X.bc that produces the same problem? Specifically how would I call bugpoint to do that? Thanks, Ryan
Hi Ryan,> I have a bitcode file X.bc that I transform using the following commands: > > opt -mypass1 -f -o X.1.bc X.bc // transform with mypass1 > llvm-link -f -o X.2.bc X.1.bc support.bc // link with support.bc > opt -mypass2 -f -o X.3.bc X.2.bc // transform with mypass2I suggest you do a debug build of LLVM and your pass (so assertions are enabled), and add "-verify" to the opt command line after "-mypassX". This may already be enough to narrow down where things are going wrong. Ciao, Duncan.
On Dec 6, 2010, at 2:18 AM, Ryan M. Lefever wrote:> > llc X.3.bc arg1 arg2 > > That llc command is currently seg faulting because of a bug in one of my > passes or in support.bc. Can I use bugpoint to find a smaller version of > X.bc that produces the same problem? Specifically how would I call > bugpoint to do that?bugpoint X.3.bc -run-llc -tool-args arg1 arg2 /jakob -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1929 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101206/97daaed8/attachment.bin>
I made a mistake in my original description of the problem. I meant to say that after transforming X.bc into X.3.bc, if my passes work then I can run the program through the the lli interpreter, (not the llc compiler), using: lli X.3.bc arg1 arg2 That lli command is currently seg faulting because of a bug in one of my passes or in support.bc. Can I use bugpoint to find a smaller version of X.bc that produces the same problem? Specifically how would I call bugpoint to do that? Do I use bugpoint with the -run-lli? I was thinking I need to use -run-custom because the problem is in my transformations, not lli. Jakob Stoklund Olesen wrote:> On Dec 6, 2010, at 2:18 AM, Ryan M. Lefever wrote: >> llc X.3.bc arg1 arg2 >> >> That llc command is currently seg faulting because of a bug in one of my >> passes or in support.bc. Can I use bugpoint to find a smaller version of >> X.bc that produces the same problem? Specifically how would I call >> bugpoint to do that? > > bugpoint X.3.bc -run-llc -tool-args arg1 arg2 > > /jakob > >