search for: goldplugin

Displaying 20 results from an estimated 120 matches for "goldplugin".

2010 Jul 22
2
[LLVMdev] problem using LTO
Hello, I down loaded "llvm-gcc4.2-2.7-x86_64-linux" and I built Spec2006 with it. It is great and except for one benchmark the rest work fine. I want to build them with LTO now. I followed the directions in " http://llvm.org/docs/GoldPlugin.html" and built ar, nm-new, and ld-new in binutils. I also built libLLVMgold.so. I get the following error: llvm-gcc: -use-gold-plugin, but libLLVMgold.so not found. The command I used with the example in "http://llvm.org/docs/GoldPlugin.html" is: /home/reza/llvm-gcc4.2-2.7-x86_64...
2013 Jan 17
0
[LLVMdev] Migrate Project Build system to LLVM BitCode
Hi Ahmad, If the Makefile contains only this command, then it is not worth spending time on GoldPlugin. If you are building a large project, then it will be simpler to use GoldPlugin. The steps you are using seem right. You can possibly combine the last two steps (3&4) using only 1 clang command. clang -g -O2 -o .libs/mergedexe .libs/mergedbc.bc -pthread -Wl,--export-dynamic .libs/lib1.a...
2013 Jan 17
4
[LLVMdev] Migrate Project Build system to LLVM BitCode
...;LLVM Bitcode' files based exe generation and applying OPT pass to LLVM Bitcode. I found out the following 4 step procedure. Please let me know if this is the right procedure or is there any other easy way of doing it. I need to modify 'Makefile' accordingly. I read on some forums about GoldPlugin but I don't know exactly if it would be useful here: Original Makefile- Object Files based Build/Link Steps: clang -g -O2 -o .libs/mergedexe file1.o file2.o file3.o -pthread -Wl,--export-dynamic .libs/lib1.a -lssl -ldl -pthread .libs/lib2.so Proposed Makefile- LLVM Bitcode base...
2010 Jul 22
0
[LLVMdev] problem using LTO
...i at gmail.com> wrote: > Hello, > > I down loaded "llvm-gcc4.2-2.7-x86_64-linux" and I built Spec2006 with it. > It is great and except for one benchmark the rest work fine. I want to build > them with LTO now. I followed the directions in > "http://llvm.org/docs/GoldPlugin.html" and built ar, nm-new, and ld-new in > binutils. I also built libLLVMgold.so. > I get the following error: > > llvm-gcc: -use-gold-plugin, but libLLVMgold.so not found. > > The command I used with the example in > "http://llvm.org/docs/GoldPlugin.html" is: &...
2011 Jan 27
0
[LLVMdev] recreate optimized clang output
..."size" is a very important optimization criterium to me. After that, the back-end will be invoked. > Is that a good approach? How about just add -O4 on clang (or llvm-gcc) command line to get LTO optimizations ? See http://llvm.org/docs/LinkTimeOptimization.html http://llvm.org/docs/GoldPlugin.html On Mac OS X, it is a checkbox in Xcode. - Devang
2011 Jan 27
4
[LLVMdev] recreate optimized clang output
On 26.01.2011, at 04:39, John McCall wrote: > On Jan 24, 2011, at 10:36 AM, Hendrix_ at gmx.net wrote: >> I was using "clang -O3 -S -emit-llvm" got some very optimized output. >> >> Then I did "clang -S -emit-llvm" (without optimization) and wanted to optimized the code in a >> separate pass. The llvm program "opt" did not do anything.
2015 May 30
3
[LLVMdev] Error in building Gold on FreeBSD
Hi I followed the steps on http://llvm.org/docs/GoldPlugin.html#lto-how-to-build to build the gold plugin on FreeBSD but ! Heres a link to the screenshot of the error: http://postimg.org/image/anlpuufbl/ This is the error message that it shows and so I am also unable to get ld-new. I checked and no CFLAGS were set in etc/make.conf. How to proceed with t...
2010 Apr 05
2
[LLVMdev] llvm gold plugin example
Hi all, Following the example from http://llvm.org/docs/GoldPlugin.html#example1 gives the following error on Ubuntu Karmic: /usr/bin/ld: error: a.a: no archive symbol table (run ranlib) /usr/bin/ld: /usr/lib/crt1.o:../sysdeps/i386/elf/start.S:115: error: undefined reference to 'main' /usr/bin/ld: b.o: in function foo1:b.c(.text+0x4): error: undefined ref...
2015 Jul 16
2
[LLVMdev] [Clang] [lld] [llvm-link] Whole program / dead-code optimization
> > > Is there a reason why LLVM's link-time optimization won't work for you? > > http://llvm.org/docs/GoldPlugin.html > http://llvm.org/docs/LinkTimeOptimization.html > > Well the primary motivation to move to LLVM is licensing which is why we also ditched binutils since we can't package gcc for iOS due to the GPL. So in the end the gold plugin wouldn't work for licensing reasons even if we c...
2010 Mar 10
4
[LLVMdev] glod plugin use
Hi, I was trying to use gold plugin to compile and run some of my passes on some large softwares like mysql, apache etc. When I compile using llvm-gcc, everything works fine. But, when I followed the instructions on http://llvm.org/docs/GoldPlugin.html#build to use gold plugin, I got errors like: /home/vadve/ssahoo2/local/bin/ld: error: modules/standard/libstandard.a: no archive symbol table (run ranlib) /home/vadve/ssahoo2/local/bin/ld: error: modules/extra/libextra.a: no archive symbol table (run ranlib) /home/vadve/ssahoo2/local/bin/ld:...
2011 Jan 27
2
[LLVMdev] recreate optimized clang output
...ery important optimization criterium to me. After that, the back-end will be invoked. >> Is that a good approach? > > How about just add -O4 on clang (or llvm-gcc) command line to get LTO optimizations ? > See http://llvm.org/docs/LinkTimeOptimization.html > http://llvm.org/docs/GoldPlugin.html > On Mac OS X, it is a checkbox in Xcode. > - > Devang My backend doesnt supply lto :( I am trying to emulate lto like this: clang *.c -S -emit-llvm cat *.ll > very_big.ll opt -O3 -extra-things... llc very_big.ll.optimized ('Ease of use' is not so important :) Best, Pa...
2012 Aug 02
3
[LLVMdev] LLVM LTO
Hi, I am trying to use LLVM LTO. I read http://llvm.org/docs/GoldPlugin.html and have some questions. Could anyone help? 1. Can LLVMgold.so work with BFD LD instead of gold? In the description of changes in binutils 2.20, "* The plugin target has been added to bfd. It can load the same shared objects used by gold and uses them to provide basic support for...
2016 Sep 16
2
(Thin)LTO llvm build
...ilt the stage1 clang, it didn’t find Gold installed, and then didn’t build the plugin. > So you need to go back to the first build (not the ThinLTO one, the one with the system compiler), and make sure that CMake finds gold. You probably missed -DLLVM_BINUTILS_INCDIR. See: http://llvm.org/docs/GoldPlugin.html — Mehdi > > >> >> I have two questions here: >> >> Is there anything I might have missed when configuring the gcc-built >> llvm install for it to be incomplete in the linker department? I mean, >> the system linker is used (not lld) and that vi...
2012 Jun 26
2
[LLVMdev] What's the difference between using llvm-link and using llvm gold plugin?
...corresponding .ll file generated according to > the > > .bc file. It seems that symbols like struct and function names are > > preserved. What is missing here? Is it possible for you to give an simple > > example? > > There is an example in > > http://llvm.org/docs/GoldPlugin.html#example1 > > Where some files are native ELF files and some are IL. Gold is able to > handle it, llvm-link will just tell you that it doesn't know about the > ELF format. > > > Thanks a lot! > > Tianyin > > > Cheers, > Rafael > -------------- next...
2016 Sep 16
2
(Thin)LTO llvm build
...Sep 16, 2016 at 2:54 PM, Carsten Mattner via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On Fri, Sep 16, 2016 at 11:28 PM, Mehdi Amini <mehdi.amini at apple.com> > wrote: > > > You probably missed -DLLVM_BINUTILS_INCDIR. > > > > See: http://llvm.org/docs/GoldPlugin.html > > plugin-api.h is in /usr/include, so I'd expect it to be found, but I > can explicitly set BINUTILS_INCDIR and re-bootstrap with gcc 6.2.1. > > I have ld.gold, but I'm not sure if /usr/bin/ld uses it, though I'd expect > it to since it's been in for a coupl...
2018 Jul 09
3
Failing compiler-rt LTO test
Hi, I'm trying to build clang/LLVM and am hitting a test failure in compiler-rt/test/safestack/lto.c. I believe the issue is that we've configured clang to use ld.bfd as the linker. ld.bfd has plugin support as described here: https://llvm.org/docs/GoldPlugin.html compiler-rt/test/lit.common.cfg isn't set up to know about ld.bfd: elif config.host_os == 'Linux' and is_linux_lto_supported(): config.lto_supported = True config.lto_launch = [] if config.use_lld: config.lto_flags = ["-fuse-ld=lld"] else: config.lto_fla...
2016 Mar 11
6
big module for a project
Hi All, I am using clang to compile Mysql source code. Because I want to do some inter-procedural analysis, hopefully, I want to get a .o(bitcode) file(a module) containing all possible function declarations and definitions. Is it possible to do that ? Or you guys have some suggestions? To be clear, like Mysql, there is a mysqld routine, which is a major routine. I want to mysqld.o(which is
2011 Mar 22
2
[LLVMdev] gold plugin example
Hi all, I got an error from the gold plugin example in the following link: http://llvm.org/docs/GoldPlugin.html#example1 Here is the error message: sangmin at sangmin-desktop:/tmp$ llvm-gcc -use-gold-plugin a.a b.o -o main /usr/bin/ld: error: a.a: no archive symbol table (run ranlib) /usr/bin/ld: /usr/lib/crt1.o:(.text+0x18): error: undefined reference to 'main' /usr/bin/ld: b.o: in function f...
2015 Jun 22
2
[LLVMdev] Enabling the gold linker on freebsd
...ons. I made gold from the binutils under /usr/ports. After building binutils using make -k install clean i got ld under /usr/bin and in the directory /usr/local/bin i got ld, ld.gold and ld.bfd. Now while trying to use link time optimization for the simple example programs herehttp://llvm.org/docs/GoldPlugin.html (a.c and b.c under the heading 'Examples of Link Time Optimization') i entered the four commands as follows: clang -flto a.c -c -o a.o ar q a.a a.o clang b.c -c -o b.o clang -flto a.a b.o -o main I got the following error: usr/bin/ld: unrecogonized option '-plugin' usr/bin/l...
2011 Mar 24
2
[LLVMdev] Instrumentation with liblto and gold
...ing liblto and gold plugin. Specifically, I added my pass in tools/lto/LTOCodeGenerator.cpp. My pass inserts functions (myLoad and myStore) for some load and store instructions. The functions exist in a library file. I found that the approach works for the example in the link: http://llvm.org/docs/GoldPlugin.html $ llvm-gcc -flto a.c -c -o a.o $ ar q a.a a.o $ llvm-gcc b.c -c -o b.o $ llvm-gcc -use-gold-plugin a.a b.o -L<path_to_my_lib> -l<my_lib> -o main I also found that I can compile large programs (apache and mysql) with gold plugin. Here is the command: $ export CC="llvm-gcc -use...