This is exactly what i m trying : opt -load /home/tsharma/ankur/llvm/Debug/lib/LLVMHello.so -hello <helloprog.bc> /dev/null Tanu Chris Lattner <sabre at nondot.org> wrote: On Wed, 9 Mar 2005, Tanu Sharma wrote:> I wrote a pass which randomizes basic blocks and insert new block.But > when i run another pass over it which simply lists all basic blocks I > don't get to see the changes.The bytecode file is not changed.Why is > that ?Maybe your random number generator sucks? :-) Can you tell me exactly what options your using to run your pass? I assume you're running it with 'opt' like this? opt in.bc -randomize | llvm-dis ? -Chris -- nondot.org/sabre llvm.cs.uiuc.edu _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu llvm.cs.uiuc.edu mail.cs.uiuc.edu/mailman/listinfo/llvmdev --------------------------------- Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.llvm.org/pipermail/llvm-dev/attachments/20050309/aba5ffe9/attachment.html>
On Wed, Mar 09, 2005 at 12:18:33PM -0800, Tanu Sharma wrote:> This is exactly what i m trying : > > opt -load /home/tsharma/ankur/llvm/Debug/lib/LLVMHello.so -hello <helloprog.bc> /dev/nullWell, you're not saving the output of your pass, it's going to /dev/null. Try: opt -load ... < input.bc > output.bc And then look at how output differs from input. -- Misha Brukman :: misha.brukman.net :: llvm.cs.uiuc.edu
If you want to be particularly lazy you can just type M.dump() at the very end of your pass too. Then you don't even had to dissamble any bytecode files. (Assuming M is the name of your Module, and you are doing a ModulePass, otherwise F.dump() for a FunctionPass with F as the name of the function). ----- Original Message ----- From: Tanu Sharma To: LLVM Developers Mailing List Sent: Wednesday, March 09, 2005 2:18 PM Subject: Re: [LLVMdev] Question This is exactly what i m trying : opt -load /home/tsharma/ankur/llvm/Debug/lib/LLVMHello.so -hello <helloprog.bc> /dev/null Tanu Chris Lattner <sabre at nondot.org> wrote: On Wed, 9 Mar 2005, Tanu Sharma wrote: > I wrote a pass which randomizes basic blocks and insert new block.But > when i run another pass over it which simply lists all basic blocks I > don't get to see the changes.The bytecode file is not changed.Why is > that ? Maybe your random number generator sucks? :-) Can you tell me exactly what options your using to run your pass? I assume you're running it with 'opt' like this? opt in.bc -randomize | llvm-dis ? -Chris -- nondot.org/sabre llvm.cs.uiuc.edu _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu llvm.cs.uiuc.edu mail.cs.uiuc.edu/mailman/listinfo/llvmdev ------------------------------------------------------------------------------ Celebrate Yahoo!'s 10th Birthday! Yahoo! Netrospective: 100 Moments of the Web ------------------------------------------------------------------------------ _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu llvm.cs.uiuc.edu mail.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <lists.llvm.org/pipermail/llvm-dev/attachments/20050309/fca41c4b/attachment.html>
Reasonably Related Threads
- [LLVMdev] Segmentation Fault(Modifying BasicBlockPlacement.cpp)
- [LLVMdev] Segmentation Fault(Modifying BasicBlockPlacement.cpp)
- [LLVMdev] Segmentation Fault(Modifying BasicBlockPlacement.cpp)
- [LLVMdev] Improving Makefile.rules header install rules [PATCH]
- [LLVMdev] Compilation without optimization