[LLVMdev] Whole program optimization

Devang Patel dpatel at apple.com
Mon Aug 30 11:10:21 PDT 2010


On Aug 30, 2010, at 10:52 AM, Bin Zeng wrote:

>  Hi folks,
> 
> I am trying to do some whole program optimization. Would you please tell 
> me how to access the other modules in llvm-gcc? For example, I am going 
> to compile all the C source files in a directory with:
> llvm-gcc *.c -O3 -o gzip
> How can I visit the other modules during compilation? Is there any 
> command switch? Thanks tons.

The command line switch is -O4, but you'll need linker support. See
	http://llvm.org/docs/GoldPlugin.html
	http://llvm.org/docs/LinkTimeOptimization.html

-
Devang




More information about the llvm-dev mailing list