Yuxi Chen via llvm-dev
2015-Nov-11 03:50 UTC
[llvm-dev] stack flag & generate ll from executable
Hi All, Does anyone know the meaning of -no-stack-slot-sharing flag in llvm? I can find this flag in llvm-2.8, but now I am using llvm-3.6.1, I couldn't use this flag via clang. Does anyone know the alternative one? Or there is no need to use this flag if we use some optimization, like O4? Another question is that I write a Pass, what I do is after analysis, I generate a .bc file, then run clang to generate executable adding my own runtime library. Hence finally, I get an executable. Does anyone know how to get .ll file from executable in clang? I can get .ll file, which is without my own runtime library, but I want to get .ll file, which has already linked with my library. Or maybe what I am thinking is wrong? Thanks for your help and suggestion. Best, Yuxi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151111/c19fb81d/attachment.html>
Russell Wallace via llvm-dev
2015-Nov-11 15:01 UTC
[llvm-dev] stack flag & generate ll from executable
On Wed, Nov 11, 2015 at 3:50 AM, Yuxi Chen via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Does anyone know the meaning of -no-stack-slot-sharing flag in llvm? I can > find this flag in llvm-2.8, but now I am using llvm-3.6.1, I couldn't use > this flag via clang. Does anyone know the alternative one? Or there is no > need to use this flag if we use some optimization, like O4? >I don't know, but I would guess if it's gone away, that's because it's no longer needed, so it's probably okay to forget about it unless some evidence to the contrary comes up.> > Another question is that I write a Pass, what I do is after analysis, I > generate a .bc file, then run clang to generate executable adding my own > runtime library. Hence finally, I get an executable. > Does anyone know how to get .ll file from executable in clang? I can get > .ll file, which is without my own runtime library, but I want to get .ll > file, which has already linked with my library. Or maybe what I am thinking > is wrong? >There is no way to turn an executable back into an intermediate code file - not only does that feature not currently exist, but it would be inherently difficult to do. Can you compile that runtime library into intermediate code and link it with the intermediate code version of the program? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151111/ea483da6/attachment.html>
Yuxi Chen via llvm-dev
2015-Nov-11 17:03 UTC
[llvm-dev] stack flag & generate ll from executable
Hi Russell, Thanks for your reply. For the second question, do you mean llvm-link? Do you know the mechanism of llvm-link? It just combines several .bc files into one? Best, Yuxi ________________________________ From: Russell Wallace [russell.wallace at gmail.com] Sent: Wednesday, November 11, 2015 9:01 AM To: Yuxi Chen Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] stack flag & generate ll from executable On Wed, Nov 11, 2015 at 3:50 AM, Yuxi Chen via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Does anyone know the meaning of -no-stack-slot-sharing flag in llvm? I can find this flag in llvm-2.8, but now I am using llvm-3.6.1, I couldn't use this flag via clang. Does anyone know the alternative one? Or there is no need to use this flag if we use some optimization, like O4? I don't know, but I would guess if it's gone away, that's because it's no longer needed, so it's probably okay to forget about it unless some evidence to the contrary comes up. Another question is that I write a Pass, what I do is after analysis, I generate a .bc file, then run clang to generate executable adding my own runtime library. Hence finally, I get an executable. Does anyone know how to get .ll file from executable in clang? I can get .ll file, which is without my own runtime library, but I want to get .ll file, which has already linked with my library. Or maybe what I am thinking is wrong? There is no way to turn an executable back into an intermediate code file - not only does that feature not currently exist, but it would be inherently difficult to do. Can you compile that runtime library into intermediate code and link it with the intermediate code version of the program? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151111/ee91c153/attachment.html>