vivek pandya via llvm-dev
2016-Jul-12 09:40 UTC
[llvm-dev] Not able to use PGO with LLVM+Clang built from source
Hello, When I try to use -fprofile-instr-generate with clang (which is built from source) I am getting following error : ld: file not found: /Users/Mr.Pandya/My_Stuff/Active/llvm/build/bin/../lib/clang/3.9.0/lib/darwin/libclang_rt.profile_osx.a clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) I am not building compiler RT with LLVM. Am I missing any thing while building llvm/clang ? Sincerely, Vivek -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160712/3fdf8934/attachment.html>
Diego Novillo via llvm-dev
2016-Jul-12 11:58 UTC
[llvm-dev] Not able to use PGO with LLVM+Clang built from source
Yes, you are missing compiler-rt. If you don't build compiler-rt, you will not be able to use PGO. On Tue, Jul 12, 2016 at 5:40 AM vivek pandya via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hello, > > When I try to use -fprofile-instr-generate with clang (which is built from > source) I am getting following error : > > ld: file not found: > /Users/Mr.Pandya/My_Stuff/Active/llvm/build/bin/../lib/clang/3.9.0/lib/darwin/libclang_rt.profile_osx.a > clang-3.9: error: linker command failed with exit code 1 (use -v to see > invocation) > > I am not building compiler RT with LLVM. > > Am I missing any thing while building llvm/clang ? > > Sincerely, > Vivek > _______________________________________________ > 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/20160712/9943c3bd/attachment.html>
Chris Bieneman via llvm-dev
2016-Jul-12 15:37 UTC
[llvm-dev] Not able to use PGO with LLVM+Clang built from source
Vivek, in case you haven't seen it, we do have full support for multi-stage PGO builds in CMake. The documentation is here: http://llvm.org/docs/AdvancedBuilds.html#multi-stage-pgo Your checkout will need to include LLVM, Clang, and Compiler-RT, and it will generate targets to run the full PGO generation. I find that using this is way easier than doing it manually. -Chris> On Jul 12, 2016, at 4:40 AM, vivek pandya via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hello, > > When I try to use -fprofile-instr-generate with clang (which is built from source) I am getting following error : > > ld: file not found: /Users/Mr.Pandya/My_Stuff/Active/llvm/build/bin/../lib/clang/3.9.0/lib/darwin/libclang_rt.profile_osx.a > clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) > > I am not building compiler RT with LLVM. > > Am I missing any thing while building llvm/clang ? > > Sincerely, > Vivek > _______________________________________________ > 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/20160712/08a7e77b/attachment.html>
vivek pandya via llvm-dev
2016-Jul-12 16:10 UTC
[llvm-dev] Not able to use PGO with LLVM+Clang built from source
On Tue, Jul 12, 2016 at 9:07 PM, Chris Bieneman <cbieneman at apple.com> wrote:> Vivek, in case you haven't seen it, we do have full support for > multi-stage PGO builds in CMake. The documentation is here: > > http://llvm.org/docs/AdvancedBuilds.html#multi-stage-pgo > > Your checkout will need to include LLVM, Clang, and Compiler-RT, and it > will generate targets to run the full PGO generation. I find that using > this is way easier than doing it manually. > > Thanks Chris for pointing this but after reading this it seems to optimizellvm/clang it self , how ever I need to use profile information in a Machine Function pass to help interprocedural register allocation and then use it to optimize other softwares. I have not look into PGO.cmake. -Vivek -Chris> > On Jul 12, 2016, at 4:40 AM, vivek pandya via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Hello, > > When I try to use -fprofile-instr-generate with clang (which is built from > source) I am getting following error : > > ld: file not found: > /Users/Mr.Pandya/My_Stuff/Active/llvm/build/bin/../lib/clang/3.9.0/lib/darwin/libclang_rt.profile_osx.a > clang-3.9: error: linker command failed with exit code 1 (use -v to see > invocation) > > I am not building compiler RT with LLVM. > > Am I missing any thing while building llvm/clang ? > > Sincerely, > Vivek > > _______________________________________________ > 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/20160712/aace3f83/attachment.html>