[LLVMdev] -O4 -fvisibility=hidden
Chris Lattner
clattner at apple.com
Fri Jan 30 23:06:58 PST 2009
On Jan 30, 2009, at 7:42 PM, Jack Howarth wrote:
> Tk/Python driven software appears very friendly to -
> fvisibility=hidden.
Nice!
> Are there any particular optimization options that one should use
> besides
> -O4 -fvisibility=hidden to enable all of the possible llvm Link Time
> Optimizations?
Nope, that should be enough. "-O4" is effectively -O3 + -flto. You
might also try -O2 -flto explicitly if you care about code size.
> Also, I assume that one only needs to compile the object files with
> -O4 -fvisibility=hidden and that the actual linkage doesn't need those
> flags to enable full LTO, correct?
Right.
Is there a significant code size or perf difference with lto?
-Chris
More information about the llvm-dev
mailing list