Peng Yu via llvm-dev
2019-Jan-28 16:24 UTC
[llvm-dev] How to generate .bc file using configure && make on Mac OS X?
This works great.> You can also try using the gllvm wrapper: https://github.com/SRI-CSL/gllvm ; it's quite reliable and easy to use in my experience.Just to be sure. Only one version of bc file will be generated that corresponds to the compiler options provide at configure? The original approach using ld.gold will provide several .bc files that correspond to different stages of the optimization. I think using gllvm, I need to specify the corresponding -O? option to the correct optimization stage of the bc file? Thanks. -- Regards, Peng
Jakub (Kuba) Kuderski via llvm-dev
2019-Jan-28 16:35 UTC
[llvm-dev] How to generate .bc file using configure && make on Mac OS X?
As far as I understand, gllvm doesn't run LTO pipeline or any cross-module optimization, and the optimization level provided is only used to compile each Translation Unit separately. If you want to have LTO-like build, you can first run gllvm with `-O3 -Xclang -disable-llvm-optzns` (builds code with no optimizations, but doesn't emit optnone and nounwind attributes) and later run opt on the final bitcode. Note that the results might not be the same as running a proper LTO build because of different pass manager pipelines. On Mon, Jan 28, 2019 at 11:24 AM Peng Yu <pengyu.ut at gmail.com> wrote:> This works great. > > > You can also try using the gllvm wrapper: > https://github.com/SRI-CSL/gllvm ; it's quite reliable and easy to use in > my experience. > > Just to be sure. Only one version of bc file will be generated that > corresponds to the compiler options provide at configure? > > The original approach using ld.gold will provide several .bc files > that correspond to different stages of the optimization. > > I think using gllvm, I need to specify the corresponding -O? option to > the correct optimization stage of the bc file? Thanks. > > -- > Regards, > Peng >-- Jakub Kuderski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190128/d0803753/attachment.html>
Jakub (Kuba) Kuderski via llvm-dev
2019-Jan-28 16:39 UTC
[llvm-dev] How to generate .bc file using configure && make on Mac OS X?
> > but doesn't emit optnone and nounwind attributes >s/nounwind/noinline On Mon, Jan 28, 2019 at 11:35 AM Jakub (Kuba) Kuderski < kubakuderski at gmail.com> wrote:> As far as I understand, gllvm doesn't run LTO pipeline or any cross-module > optimization, and the optimization level provided is only used to compile > each Translation Unit separately. > If you want to have LTO-like build, you can first run gllvm with `-O3 > -Xclang -disable-llvm-optzns` (builds code with no optimizations, but > doesn't emit optnone and nounwind attributes) and later run opt on the > final bitcode. Note that the results might not be the same as running a > proper LTO build because of different pass manager pipelines. > > On Mon, Jan 28, 2019 at 11:24 AM Peng Yu <pengyu.ut at gmail.com> wrote: > >> This works great. >> >> > You can also try using the gllvm wrapper: >> https://github.com/SRI-CSL/gllvm ; it's quite reliable and easy to use >> in my experience. >> >> Just to be sure. Only one version of bc file will be generated that >> corresponds to the compiler options provide at configure? >> >> The original approach using ld.gold will provide several .bc files >> that correspond to different stages of the optimization. >> >> I think using gllvm, I need to specify the corresponding -O? option to >> the correct optimization stage of the bc file? Thanks. >> >> -- >> Regards, >> Peng >> > > > -- > Jakub Kuderski >-- Jakub Kuderski -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190128/92a71bd3/attachment.html>
Reasonably Related Threads
- How to generate .bc file using configure && make on Mac OS X?
- How to generate .bc file using configure && make on Mac OS X?
- LLVM bc converter from LLVM 3.9 to LLVM 3.1
- LLVM bc converter from LLVM 3.9 to LLVM 3.1
- LLVM bc converter from LLVM 3.9 to LLVM 3.1