[LLVMdev] What are the optimizations that gold uses during the final link stage?
jingl1345 at gmail.com
Wed Aug 18 22:25:02 PDT 2010
I am using gold plugin with the option "-use-gold-plugin
-Wl,-plugin-opt=also-emit-llvm" to compile apache.
I objdumped the final executable httpd to httpd.S.
I also compiled those per file bytecode into native code using the
llvm-gcc -c filename.o.s -o filename.o.o
Then I objdumped filename.o.o to filename.o.S and compared some
functions between httpd.S. and filename.o.S, and I found the order of
some instructions are different.
Is this the expected behavior, probably because of some optimization
during the final link stage? If this is the case, can you point me what
those optimizations are, so that I could also apply them while compiling
per file bytecode to native code.
Or am I using the wrong way to compile per file bytecode to native code?
More information about the llvm-dev