Christophe Duvernois
2012-Nov-19 18:25 UTC
[LLVMdev] Emit only one function of the module to native code
Hi I use llvm-3.1. I have a large module and i want to emit native code (or assembly) for one function. I tried to replace the PassManager in llc by a FunctionPassManager but I have a crash so this is probably not the good way to do it. (cf attached my simple test) Is it possible to write one function from the module? What is the good way to do it? Thanks in advance. Christophe -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121119/03ab261a/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: test.c Type: text/x-csrc Size: 132 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121119/03ab261a/attachment.c> -------------- next part -------------- A non-text attachment was scrubbed... Name: test.bc Type: application/octet-stream Size: 720 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121119/03ab261a/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: proto.cpp Type: text/x-c++src Size: 4919 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121119/03ab261a/attachment.cpp>
Eric Christopher
2012-Nov-19 20:50 UTC
[LLVMdev] Emit only one function of the module to native code
llvm-extract and then llc? -eric On Mon, Nov 19, 2012 at 10:25 AM, Christophe Duvernois < christophe.duvernois at gmail.com> wrote:> Hi > > I use llvm-3.1. I have a large module and i want to emit native code (or > assembly) for one function. > > I tried to replace the PassManager in llc by a FunctionPassManager but I > have a crash so this is probably not the good way to do it. (cf attached > my simple test) > > Is it possible to write one function from the module? What is the good way > to do it? > > Thanks in advance. > > Christophe > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121119/eab6fe29/attachment.html>
Christophe Duvernois
2012-Nov-19 21:31 UTC
[LLVMdev] Emit only one function of the module to native code
Ok thanks, I thought there was a more direct way to do it... 2012/11/19 Eric Christopher <echristo at gmail.com>> llvm-extract and then llc? > > -eric > > > On Mon, Nov 19, 2012 at 10:25 AM, Christophe Duvernois < > christophe.duvernois at gmail.com> wrote: > >> Hi >> >> I use llvm-3.1. I have a large module and i want to emit native code (or >> assembly) for one function. >> >> I tried to replace the PassManager in llc by a FunctionPassManager but I >> have a crash so this is probably not the good way to do it. (cf attached >> my simple test) >> >> Is it possible to write one function from the module? What is the good >> way to do it? >> >> Thanks in advance. >> >> Christophe >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121119/f42a4633/attachment.html>
Apparently Analagous Threads
- [LLVMdev] Emit only one function of the module to native code
- [LLVMdev] Emit only one function of the module to native code
- [LLVMdev] Emit only one function of the module to native code
- [LLVMdev] PassManager vs FunctionPassManager
- Some questions about phase ordering in OPT and LLC