Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Performing my own pass with a single command line?"
2010 Apr 21
1
[LLVMdev] Performing my own pass with a single command line?
Hi John,
Are there any documents about how to add a pass into LTO?
Cheers,
Zheng
On 19 April 2010 15:11, John Criswell <criswell at uiuc.edu> wrote:
> Dear Zheng Wang,
>
> You have a few options:
>
> 1) You can add your pass to the set of passes that llvm-gcc runs when it
> optimizes code. This requires re-compiling llvm-gcc; it also means that
> your pass must be
2010 Apr 19
0
[LLVMdev] Performing my own pass with a single command line?
Dear Zheng Wang,
You have a few options:
1) You can add your pass to the set of passes that llvm-gcc runs when it
optimizes code. This requires re-compiling llvm-gcc; it also means that
your pass must be able to run on incomplete programs and be run multiple
times over the same code (i.e., it cannot do whole-program analysis).
2) You can change the build system of the program you're
2010 Mar 05
3
[LLVMdev] Compile a large project with llvm?
Hi,
How to compile a large project (such as Apache) by using llvm-gcc?
I tried to replace CC with llvm-gcc and CFLAGS with -emit-llvm while
running configure, but it didn't work.
Thank you for your help.
-Wink
2010 Mar 05
2
[LLVMdev] Compile a large project with llvm?
Dear John,
Thanks for your reply. I want to do whole program analysis, all what I
need are just the separate .bc files. What instructions should I follow?
I run the configure on apache in this way:
CC=clang CFLAGS=-emit-llvm ./configure
while I get the error message like:
checking for gcc... clang
checking for C compiler default output file name... configure: error: C
compiler cannot
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
2010 Mar 05
0
[LLVMdev] Compile a large project with llvm?
Wink zhang wrote:
> Hi,
>
> How to compile a large project (such as Apache) by using llvm-gcc?
> I tried to replace CC with llvm-gcc and CFLAGS with -emit-llvm while
> running configure, but it didn't work.
>
If you just want to compile the program with llvm-gcc, then Diego's
instructions are fine.
If, however, you want to do inter-procedural optimization or whole
2010 Mar 05
0
[LLVMdev] Compile a large project with llvm?
Wink zhang wrote:
> Dear John,
>
> Thanks for your reply. I want to do whole program analysis, all what I
> need are just the separate .bc files. What instructions should I follow?
>
I'm a little confused. Whole-program analysis requires that you link
all of the individual bitcode files from different compilation unit
(i.e., individual .c files) together into a single
2007 Sep 23
2
[LLVMdev] Compiling zlib to static bytecode archive
On Friday 21 September 2007, Chris Lattner wrote:
> On Sep 21, 2007, at 9:42 AM, Maarten ter Huurne wrote:
> > However, it is not possible to let the zlib Makefile issue that
> > command
> > without patching the Makefile, because the fragment that does the
> > linking is
> > hardcoded to use the compiler command for linking:
> >
> > example$(EXE):
2010 Apr 21
1
[LLVMdev] Link time optimisation error?
Hello,
I followed the instruction given at:
http://llvm.org/docs/LinkTimeOptimization.html#design, but got an
error.
Why it was that? Should I enable anything when configuring LLVM? I am
using LLVM v2.6.
$ llvm-gcc --emit-llvm -c a.c -o a.o
$ llvm-gcc -c main.c -o main.o
$ llvm-gcc a.o main.o -o main
a.o: file not recognized: File format not recognized
collect2: ld returned 1 exit status
2010 Oct 04
2
[LLVMdev] fPIC in llvm 2.6
It appears that llvm-ld can handle bitcode files but llvm-gcc complains
that when I pass bitcode files to it. I assume that means that llvm-gcc
does not use llvm-ld by default. Is there a way to force it to use llvm-ld?
Bill Wendling wrote:
> You do it by using the -flto flag. But you will need a linker that's able to handle the bitcode files. The Apple linker can and so can the
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.
2011 Jan 27
0
[LLVMdev] recreate optimized clang output
On Jan 27, 2011, at 12:02 PM, Hendrix_ at gmx.net wrote:
> OK, I am looking for "LTO"/global optimization. So the function definition will remain "somewhere else" (externally), and the optimizer will find in some other module to possibly inline it later on.
>
> I am planning to concat all the *.ll (eg "link" the files) and pass them to the
2008 Dec 08
3
[LLVMdev] Tutorial on writing Link Time Optimization Passes?
Hi,
Is there a tutorial on how to get started with writing link-time
optimization passes? The documentation at
http://www.llvm.org/docs/LinkTimeOptimization.html explains the design
of the LTO interface, but does not explain where to start writing
code. Would my pass go inside libLTO.a or is it separate from
libLTO.a? What I would like to be able to do is traverse through the
entire
2007 Sep 26
0
[LLVMdev] Compiling zlib to static bytecode archive
On Sep 23, 2007, at 3:27 AM, Maarten ter Huurne wrote:
> On Friday 21 September 2007, Chris Lattner wrote:
>> On Sep 21, 2007, at 9:42 AM, Maarten ter Huurne wrote:
>>> However, it is not possible to let the zlib Makefile issue that
>>> command
>>> without patching the Makefile, because the fragment that does the
>>> linking is
>>> hardcoded
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
2009 Jul 07
1
[LLVMdev] CVS binutils includes support for plugins, can use the llvm plugin.
On May 26, 2009, at 10:52 AM, Rafael Espindola wrote:
> Today support for plugins has been committed to BFD. That is the file
> format abstraction library used by binutils. This now works
Very nice Rafael! Can you please update the web page to mention this,
e.g. in the LinkTimeOptimization.html document and wherever else
relevant?
-Chris
>
> $ llvm-gcc -emit-llvm -O2 -c a.c
2011 Jan 27
2
[LLVMdev] recreate optimized clang output
On 27.01.2011, at 21:12, Devang Patel wrote:
>
> On Jan 27, 2011, at 12:02 PM, Hendrix_ at gmx.net wrote:
>
>> OK, I am looking for "LTO"/global optimization. So the function definition will remain "somewhere else" (externally), and the optimizer will find in some other module to possibly inline it later on.
>>
>> I am planning to concat all the
2011 Mar 24
2
[LLVMdev] Instrumentation with liblto and gold
Hi,
I need advice in instrumenting programs using 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
2015 Jul 16
2
[LLVMdev] [Clang] [lld] [llvm-link] Whole program / dead-code optimization
Hi All,
After the initial learning curve, we're excited to have put together a
completely gcc/binutils-free toolchain based on LLVM. Now that we have
things working, we desperately need to optimize the resulting binaries.
Our bin files are up to 10x their fully optimized gcc equivalent (1.5k vs
16k). This is for a bare metal ARM based system so this is significant.
We're using lld for
2015 Jun 22
2
[LLVMdev] Enabling the gold linker on freebsd
I have been trying to enable the gold linker on FreeBSD to use the link
time optimizations. 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