[llvm-branch-commits] [llvm-gcc-branch] r142865 - in /llvm-gcc-4.2/branches/Apple/Morbo/gcc: doc/invoke.texi doc/llvm-gcc.1 gcc.c

Bill Wendling isanbard at gmail.com
Mon Oct 24 15:33:33 PDT 2011


Author: void
Date: Mon Oct 24 17:33:33 2011
New Revision: 142865

URL: http://llvm.org/viewvc/llvm-project?rev=142865&view=rev
Log:
LTO isn't working in Morbo. Convert the -O4 to -O3 and ignore the -flto flag.
<rdar://problem/10299475>

Modified:
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/invoke.texi
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/llvm-gcc.1
    llvm-gcc-4.2/branches/Apple/Morbo/gcc/gcc.c

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/invoke.texi
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/invoke.texi?rev=142865&r1=142864&r2=142865&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/invoke.texi (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/invoke.texi Mon Oct 24 17:33:33 2011
@@ -433,7 +433,7 @@
 -ftree-copy-prop -ftree-store-ccp -ftree-store-copy-prop -fwhole-program @gol
 --param @var{name}=@var{value}
 @c LLVM LOCAL -fast, -Oz,
--flto (APPLE ONLY) -O  -O0  -O1  -O2  -O3 -O4 (APPLE ONLY) -Os -Oz (APPLE ONLY) -fast (APPLE ONLY)}
+(APPLE ONLY) -O  -O0  -O1  -O2  -O3 (APPLE ONLY) -Os -Oz (APPLE ONLY) -fast (APPLE ONLY)}
 
 @item Preprocessor Options
 @xref{Preprocessor Options,,Options Controlling the Preprocessor}.
@@ -5156,17 +5156,6 @@
 @option{-O2} and also turns on the @option{-finline-functions},
 @option{-funswitch-loops} and @option{-fgcse-after-reload} options.
 
- at c LLVM LOCAL begin
- at item -flto
- at opindex flto
-Enable LLVM Link Time Optimization. 
-
- at item -O4
- at opindex O4
-Enable LLVM Link Time Optimization. @option{-O4} turns on all LLVM compile
-time optimizations specified by @option{-O2}.
- at c LLVM LOCAL end
-
 @item -O0
 @opindex O0
 Do not optimize.  This is the default.

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/llvm-gcc.1
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/llvm-gcc.1?rev=142865&r1=142864&r2=142865&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/llvm-gcc.1 (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/doc/llvm-gcc.1 Mon Oct 24 17:33:33 2011
@@ -23,10 +23,6 @@
 llvm-gcc is a C, C++, Objective-C and Objective-C++ compiler. llvm-g++ is a compiler driver for C++. llvm-gcc uses gcc front-end and gcc's command line interface. Consult the cc(1) man page for command line options supported by llvm-gcc. Only selected LLVM specific options are listed here.
 .Pp
 .Bl -tag -width -indent
-.It Fl flto
-Enables Link Time Optimization. Link Time Optimization is performed by ld(1) transparently using the LLVM optimizer. The object file generated contains intermediate LLVM bitcode instead of Mach-O objects.
-.It Fl O4
-Enables Link Time Optimization in addition to all optimizations enabled at -O3.
 .It Fl O
 Unlike gcc, -O means -O2 instead of -O1.
 .El

Modified: llvm-gcc-4.2/branches/Apple/Morbo/gcc/gcc.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Morbo/gcc/gcc.c?rev=142865&r1=142864&r2=142865&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Morbo/gcc/gcc.c (original)
+++ llvm-gcc-4.2/branches/Apple/Morbo/gcc/gcc.c Mon Oct 24 17:33:33 2011
@@ -840,10 +840,12 @@
 /* LLVM LOCAL begin */
 static const char *llvm_options =
 #ifdef ENABLE_LLVM
-"%{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}}}"
+"%{O4:-O3}%<O4\
+ %<flto\
+ %{emit-llvm:%{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,7 +862,7 @@
 "/* LLVM LOCAL */"\
  %1 %{!Q:-quiet} -dumpbase %B %{d*} %{Zmllvm*: -mllvm %*} %{m*} %{a*}\
  %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}\
- %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
+ %{g*} %{!O4:%{O*}} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
  %{v:-version} %{pg:-p} %{p} %{f*} %{undef}\
  %{Qn:-fno-ident} %{--help:--help}\
  %{--target-help:--target-help}\





More information about the llvm-branch-commits mailing list