[llvm-commits] [llvm-gcc-4.2] r55795 - in /llvm-gcc-4.2/trunk/gcc: doc/invoke.texi gcc.c
Devang Patel
dpatel at apple.com
Thu Sep 4 14:15:38 PDT 2008
Author: dpatel
Date: Thu Sep 4 16:15:38 2008
New Revision: 55795
URL: http://llvm.org/viewvc/llvm-project?rev=55795&view=rev
Log:
Add -flto command line switch to enable link time optimization.
Modified:
llvm-gcc-4.2/trunk/gcc/doc/invoke.texi
llvm-gcc-4.2/trunk/gcc/gcc.c
Modified: llvm-gcc-4.2/trunk/gcc/doc/invoke.texi
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/doc/invoke.texi?rev=55795&r1=55794&r2=55795&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/doc/invoke.texi (original)
+++ llvm-gcc-4.2/trunk/gcc/doc/invoke.texi Thu Sep 4 16:15:38 2008
@@ -425,7 +425,7 @@
-ftree-copy-prop -ftree-store-ccp -ftree-store-copy-prop -fwhole-program @gol
--param @var{name}=@var{value}
@c LLVM LOCAL -fast, -Oz,
--O -O0 -O1 -O2 -O3 -O4 (APPLE ONLY) -Os -Oz (APPLE ONLY) -fast (APPLE ONLY)}
+-flto (APPLE ONLY) -O -O0 -O1 -O2 -O3 -O4 (APPLE ONLY) -Os -Oz (APPLE ONLY) -fast (APPLE ONLY)}
@item Preprocessor Options
@xref{Preprocessor Options,,Options Controlling the Preprocessor}.
@@ -5115,6 +5115,10 @@
@option{-funswitch-loops} and @option{-fgcse-after-reload} options.
@c LLVM LOCAL begin
+ at item -flto
+ at opindex flto
+Enable LLVM Link Time Optimization.
+
@item -O4
@opindex O4
Enable LLVM Link Time Optimization. @option{-O4} turns on all LLVM compile
Modified: llvm-gcc-4.2/trunk/gcc/gcc.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/gcc.c?rev=55795&r1=55794&r2=55795&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/gcc.c (original)
+++ llvm-gcc-4.2/trunk/gcc/gcc.c Thu Sep 4 16:15:38 2008
@@ -825,10 +825,10 @@
/* LLVM LOCAL begin */
static const char *llvm_options =
#ifdef ENABLE_LLVM
-"%{O4|emit-llvm:%{S:-emit-llvm} \
- %{!S:-emit-llvm-bc \
- %{c: %W{o*} %{!o*:-o %b%w.o}} \
- %{!c:-o %d%w%u%O}}}"
+"%{O4|emit-llvm|flto:%{S:-emit-llvm} \
+ %{!S:-emit-llvm-bc \
+ %{c: %W{o*} %{!o*:-o %b%w.o}} \
+ %{!c:-o %d%w%u%O}}}"
#else
"%{emit-llvm:%e--emit-llvm is not supported in this configuration.}"
#endif
@@ -860,10 +860,10 @@
static const char *invoke_as =
#ifdef AS_NEEDS_DASH_FOR_PIPED_INPUT
/* LLVM LOCAL */
-"%{!O4:%{!emit-llvm:%{!S:-o %|.s |\n as %(asm_options) %|.s %A }}}";
+"%{!O4:%{!emit-llvm:%{!flto:%{!S:-o %|.s |\n as %(asm_options) %|.s %A }}}}";
#else
/* LLVM LOCAL */
-"%{!O4:%{!emit-llvm:%{!S:-o %|.s |\n as %(asm_options) %m.s %A }}}";
+"%{!O4:%{!emit-llvm:%{!flto:%{!S:-o %|.s |\n as %(asm_options) %m.s %A }}}}";
#endif
/* Some compilers have limits on line lengths, and the multilib_select
More information about the llvm-commits
mailing list