marwayusuf@feng.bu.edu.eg via llvm-dev
2016-Mar-15 13:22 UTC
[llvm-dev] Getting the original high-level code
Dear All Is there is a way I can get the original hogh level code (e.g c++ code) of an IR function within MCJIT? Regards, Marwa Yusuf Teaching Assistant - Computer Engineering Department Faculty of Engineering - Benha University E-JUST PhD Student Computer Science & Engineering Dept. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160315/bad20fa3/attachment.html>
David Blaikie via llvm-dev
2016-Mar-15 17:43 UTC
[llvm-dev] Getting the original high-level code
There's nothing built into LLVM and Clang for going backwards through the lowering chain (MC->IR, IR->C++, etc). I think some third parties have built some pieces of this, but of course it is rather lossy. On Tue, Mar 15, 2016 at 6:22 AM, marwayusuf at feng.bu.edu.eg via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Dear All > > Is there is a way I can get the original hogh level code (e.g c++ code) of > an IR function within MCJIT? > > > Regards, > Marwa Yusuf > Teaching Assistant - Computer Engineering Department > Faculty of Engineering - Benha University > E-JUST PhD Student > Computer Science & Engineering Dept. > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160315/bf1b4b8d/attachment.html>
Lang Hames via llvm-dev
2016-Mar-16 00:15 UTC
[llvm-dev] Getting the original high-level code
Hi Marwa, There's no generic way to de-compile IR, but if the IR has debug info attached you may be able to find the path to the original source file. - Lang. On Tue, Mar 15, 2016 at 10:43 AM, David Blaikie via llvm-dev < llvm-dev at lists.llvm.org> wrote:> There's nothing built into LLVM and Clang for going backwards through the > lowering chain (MC->IR, IR->C++, etc). I think some third parties have > built some pieces of this, but of course it is rather lossy. > > On Tue, Mar 15, 2016 at 6:22 AM, marwayusuf at feng.bu.edu.eg via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Dear All >> >> Is there is a way I can get the original hogh level code (e.g c++ code) >> of an IR function within MCJIT? >> >> >> Regards, >> Marwa Yusuf >> Teaching Assistant - Computer Engineering Department >> Faculty of Engineering - Benha University >> E-JUST PhD Student >> Computer Science & Engineering Dept. >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160315/fb328416/attachment.html>
John Criswell via llvm-dev
2016-Mar-16 14:00 UTC
[llvm-dev] Getting the original high-level code
On 3/15/16 9:22 AM, marwayusuf at feng.bu.edu.eg via llvm-dev wrote:> > Dear All > > Is there is a way I can get the original hogh level code (e.g c++ > code) of an IR function within MCJIT? >You might want to specify the context. Are you compiling high level code to LLVM IR to MachineInstr to MC and then wanting to map an MC instruction back to a source level instruction? Or are you disassembling a binary program to the MC IR and then wanting to reconstruct the source code? The answer to your question depends on which of these you are trying to do. Regards, John Criswell> > Regards, > Marwa Yusuf > Teaching Assistant - Computer Engineering Department > Faculty of Engineering - Benha University > E-JUST PhD Student > Computer Science & Engineering Dept. > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-- John Criswell Assistant Professor Department of Computer Science, University of Rochester http://www.cs.rochester.edu/u/criswell -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160316/64c82e69/attachment-0001.html>
marwayusuf@feng.bu.edu.eg via llvm-dev
2016-Mar-17 13:04 UTC
[llvm-dev] Getting the original high-level code
I've compiled high level to IR and I want to get the original source code (Not to generate high level code) of a given IR function or part of function like a loop for example. Regards, Marwa Yusuf Teaching Assistant - Computer Engineering Department Faculty of Engineering - Benha University E-JUST PhD Student Computer Science & Engineering Dept. ________________________________ From: John Criswell <jtcriswel at gmail.com> Sent: Wednesday, March 16, 2016 4:00 PM To: marwayusuf at feng.bu.edu.eg; llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Getting the original high-level code On 3/15/16 9:22 AM, marwayusuf at feng.bu.edu.eg<mailto:marwayusuf at feng.bu.edu.eg> via llvm-dev wrote: Dear All Is there is a way I can get the original hogh level code (e.g c++ code) of an IR function within MCJIT? You might want to specify the context. Are you compiling high level code to LLVM IR to MachineInstr to MC and then wanting to map an MC instruction back to a source level instruction? Or are you disassembling a binary program to the MC IR and then wanting to reconstruct the source code? The answer to your question depends on which of these you are trying to do. Regards, John Criswell Regards, Marwa Yusuf Teaching Assistant - Computer Engineering Department Faculty of Engineering - Benha University E-JUST PhD Student Computer Science & Engineering Dept. _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -- John Criswell Assistant Professor Department of Computer Science, University of Rochester http://www.cs.rochester.edu/u/criswell -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160317/f05358ea/attachment.html>