[llvm] r219951 - Delete -std-compile-opts.
Rafael Espindola
rafael.espindola at gmail.com
Thu Oct 16 13:00:03 PDT 2014
Author: rafael
Date: Thu Oct 16 15:00:02 2014
New Revision: 219951
URL: http://llvm.org/viewvc/llvm-project?rev=219951&view=rev
Log:
Delete -std-compile-opts.
These days -std-compile-opts was just a silly alias for -O3.
Modified:
llvm/trunk/docs/CommandGuide/opt.rst
llvm/trunk/docs/HowToSubmitABug.rst
llvm/trunk/lib/Target/README.txt
llvm/trunk/test/Analysis/BasicAA/2008-04-15-Byval.ll
llvm/trunk/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
llvm/trunk/test/CodeGen/PowerPC/ppcf128-1.ll
llvm/trunk/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll
llvm/trunk/test/CodeGen/X86/asm-block-labels.ll
llvm/trunk/test/CodeGen/X86/dllimport-x86_64.ll
llvm/trunk/test/CodeGen/X86/dllimport.ll
llvm/trunk/test/CodeGen/X86/nancvt.ll
llvm/trunk/test/Feature/weak_constant.ll
llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll
llvm/trunk/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll
llvm/trunk/test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll
llvm/trunk/tools/bugpoint/bugpoint.cpp
llvm/trunk/tools/opt/opt.cpp
llvm/trunk/utils/findmisopt
Modified: llvm/trunk/docs/CommandGuide/opt.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/opt.rst?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/opt.rst (original)
+++ llvm/trunk/docs/CommandGuide/opt.rst Thu Oct 16 15:00:02 2014
@@ -62,27 +62,14 @@ OPTIONS
available. The order in which the options occur on the command line are the
order in which they are executed (within pass constraints).
-.. option:: -std-compile-opts
-
- This is short hand for a standard list of *compile time optimization* passes.
- It might be useful for other front end compilers as well. To discover the
- full set of options available, use the following command:
-
- .. code-block:: sh
-
- llvm-as < /dev/null | opt -std-compile-opts -disable-output -debug-pass=Arguments
-
.. option:: -disable-inlining
- This option is only meaningful when :option:`-std-compile-opts` is given. It
- simply removes the inlining pass from the standard list.
+ This option simply removes the inlining pass from the standard list.
.. option:: -disable-opt
- This option is only meaningful when :option:`-std-compile-opts` is given. It
- disables most, but not all, of the :option:`-std-compile-opts`. The ones that
- remain are :option:`-verify`, :option:`-lower-setjmp`, and
- :option:`-funcresolve`.
+ This option is only meaningful when :option:`-std-link-opts` is given. It
+ disables most passes.
.. option:: -strip-debug
@@ -95,9 +82,7 @@ OPTIONS
This option causes opt to add a verify pass after every pass otherwise
specified on the command line (including :option:`-verify`). This is useful
for cases where it is suspected that a pass is creating an invalid module but
- it is not clear which pass is doing it. The combination of
- :option:`-std-compile-opts` and :option:`-verify-each` can quickly track down
- this kind of problem.
+ it is not clear which pass is doing it.
.. option:: -stats
Modified: llvm/trunk/docs/HowToSubmitABug.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/HowToSubmitABug.rst?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/docs/HowToSubmitABug.rst (original)
+++ llvm/trunk/docs/HowToSubmitABug.rst Thu Oct 16 15:00:02 2014
@@ -89,7 +89,7 @@ Then run:
.. code-block:: bash
- opt -std-compile-opts -debug-pass=Arguments foo.bc -disable-output
+ opt -O3 -debug-pass=Arguments foo.bc -disable-output
This command should do two things: it should print out a list of passes, and
then it should crash in the same way as clang. If it doesn't crash, please
Modified: llvm/trunk/lib/Target/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/README.txt?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/lib/Target/README.txt (original)
+++ llvm/trunk/lib/Target/README.txt Thu Oct 16 15:00:02 2014
@@ -733,7 +733,7 @@ f (unsigned long a, unsigned long b, uns
return ((a & (c - 1)) != 0) | ((b & (c - 1)) != 0);
}
Both should combine to ((a|b) & (c-1)) != 0. Currently not optimized with
-"clang -emit-llvm-bc | opt -std-compile-opts".
+"clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
@@ -746,7 +746,7 @@ void clear_pmd_range(unsigned long start
}
The expression should optimize to something like
"!((start|end)&~PMD_MASK). Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
@@ -765,7 +765,7 @@ int f(int x, int y)
return (abs(x)) >= 0;
}
This should optimize to x == INT_MIN. (With -fwrapv.) Currently not
-optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+optimized with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
@@ -803,117 +803,117 @@ rshift_gt (unsigned int a)
All should simplify to a single comparison. All of these are
currently not optimized with "clang -emit-llvm-bc | opt
--std-compile-opts".
+-O3".
//===---------------------------------------------------------------------===//
From GCC Bug 32605:
int c(int* x) {return (char*)x+2 == (char*)x;}
Should combine to 0. Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts" (although llc can optimize it).
+-emit-llvm-bc | opt -O3" (although llc can optimize it).
//===---------------------------------------------------------------------===//
int a(unsigned b) {return ((b << 31) | (b << 30)) >> 31;}
Should be combined to "((b >> 1) | b) & 1". Currently not optimized
-with "clang -emit-llvm-bc | opt -std-compile-opts".
+with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
unsigned a(unsigned x, unsigned y) { return x | (y & 1) | (y & 2);}
Should combine to "x | (y & 3)". Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int a(int a, int b, int c) {return (~a & c) | ((c|a) & b);}
Should fold to "(~a & c) | (a & b)". Currently not optimized with
-"clang -emit-llvm-bc | opt -std-compile-opts".
+"clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int a(int a,int b) {return (~(a|b))|a;}
Should fold to "a|~b". Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int a(int a, int b) {return (a&&b) || (a&&!b);}
Should fold to "a". Currently not optimized with "clang -emit-llvm-bc
-| opt -std-compile-opts".
+| opt -O3".
//===---------------------------------------------------------------------===//
int a(int a, int b, int c) {return (a&&b) || (!a&&c);}
Should fold to "a ? b : c", or at least something sane. Currently not
-optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+optimized with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int a(int a, int b, int c) {return (a&&b) || (a&&c) || (a&&b&&c);}
Should fold to a && (b || c). Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int a(int x) {return x | ((x & 8) ^ 8);}
Should combine to x | 8. Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int a(int x) {return x ^ ((x & 8) ^ 8);}
Should also combine to x | 8. Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int a(int x) {return ((x | -9) ^ 8) & x;}
Should combine to x & -9. Currently not optimized with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
unsigned a(unsigned a) {return a * 0x11111111 >> 28 & 1;}
Should combine to "a * 0x88888888 >> 31". Currently not optimized
-with "clang -emit-llvm-bc | opt -std-compile-opts".
+with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
unsigned a(char* x) {if ((*x & 32) == 0) return b();}
There's an unnecessary zext in the generated code with "clang
--emit-llvm-bc | opt -std-compile-opts".
+-emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
unsigned a(unsigned long long x) {return 40 * (x >> 1);}
Should combine to "20 * (((unsigned)x) & -2)". Currently not
-optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+optimized with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int g(int x) { return (x - 10) < 0; }
Should combine to "x <= 9" (the sub has nsw). Currently not
-optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+optimized with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int g(int x) { return (x + 10) < 0; }
Should combine to "x < -10" (the add has nsw). Currently not
-optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+optimized with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
int f(int i, int j) { return i < j + 1; }
int g(int i, int j) { return j > i - 1; }
Should combine to "i <= j" (the add/sub has nsw). Currently not
-optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+optimized with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
unsigned f(unsigned x) { return ((x & 7) + 1) & 15; }
The & 15 part should be optimized away, it doesn't change the result. Currently
-not optimized with "clang -emit-llvm-bc | opt -std-compile-opts".
+not optimized with "clang -emit-llvm-bc | opt -O3".
//===---------------------------------------------------------------------===//
Modified: llvm/trunk/test/Analysis/BasicAA/2008-04-15-Byval.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/BasicAA/2008-04-15-Byval.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/BasicAA/2008-04-15-Byval.ll (original)
+++ llvm/trunk/test/Analysis/BasicAA/2008-04-15-Byval.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts -S | FileCheck %s
+; RUN: opt < %s -O3 -S | FileCheck %s
; ModuleID = 'small2.c'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i386-apple-darwin8"
Modified: llvm/trunk/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll (original)
+++ llvm/trunk/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt -std-compile-opts < %s | llvm-dis | not grep badref
+; RUN: opt -O3 < %s | llvm-dis | not grep badref
; RUN: verify-uselistorder %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
Modified: llvm/trunk/test/CodeGen/PowerPC/ppcf128-1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppcf128-1.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppcf128-1.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppcf128-1.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts | llc > %t
+; RUN: opt < %s -O3 | llc > %t
; ModuleID = 'ld3.c'
target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
target triple = "powerpc-apple-darwin8"
Modified: llvm/trunk/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll (original)
+++ llvm/trunk/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts | \
+; RUN: opt < %s -O3 | \
; RUN: llc -mtriple=thumbv7-apple-darwin10 -mattr=+neon | FileCheck %s
define void @fred(i32 %three_by_three, i8* %in, double %dt1, i32 %x_size, i32 %y_size, i8* %bp) nounwind {
Modified: llvm/trunk/test/CodeGen/X86/asm-block-labels.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/asm-block-labels.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/asm-block-labels.ll (original)
+++ llvm/trunk/test/CodeGen/X86/asm-block-labels.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts | llc -no-integrated-as
+; RUN: opt < %s -O3 | llc -no-integrated-as
; ModuleID = 'block12.c'
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
target triple = "i686-apple-darwin8"
Modified: llvm/trunk/test/CodeGen/X86/dllimport-x86_64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dllimport-x86_64.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/dllimport-x86_64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/dllimport-x86_64.ll Thu Oct 16 15:00:02 2014
@@ -4,7 +4,7 @@
; RUN: llc -mtriple x86_64-pc-mingw32 -O0 < %s | FileCheck %s -check-prefix=FAST
; PR6275
;
-; RUN: opt -mtriple x86_64-pc-win32 -std-compile-opts -S < %s | FileCheck %s -check-prefix=OPT
+; RUN: opt -mtriple x86_64-pc-win32 -O3 -S < %s | FileCheck %s -check-prefix=OPT
@Var1 = external dllimport global i32
@Var2 = available_externally dllimport unnamed_addr constant i32 1
Modified: llvm/trunk/test/CodeGen/X86/dllimport.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dllimport.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/dllimport.ll (original)
+++ llvm/trunk/test/CodeGen/X86/dllimport.ll Thu Oct 16 15:00:02 2014
@@ -4,7 +4,7 @@
; RUN: llc -mtriple i386-pc-mingw32 -O0 < %s | FileCheck %s -check-prefix=FAST
; PR6275
;
-; RUN: opt -mtriple i386-pc-win32 -std-compile-opts -S < %s | FileCheck %s -check-prefix=OPT
+; RUN: opt -mtriple i386-pc-win32 -O3 -S < %s | FileCheck %s -check-prefix=OPT
@Var1 = external dllimport global i32
@Var2 = available_externally dllimport unnamed_addr constant i32 1
Modified: llvm/trunk/test/CodeGen/X86/nancvt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/nancvt.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/nancvt.ll (original)
+++ llvm/trunk/test/CodeGen/X86/nancvt.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts | llc > %t
+; RUN: opt < %s -O3 | llc > %t
; RUN: grep 2147027116 %t | count 3
; RUN: grep 2147228864 %t | count 3
; RUN: grep 2146502828 %t | count 3
Modified: llvm/trunk/test/Feature/weak_constant.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Feature/weak_constant.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/Feature/weak_constant.ll (original)
+++ llvm/trunk/test/Feature/weak_constant.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts -S > %t
+; RUN: opt < %s -O3 -S > %t
; RUN: grep undef %t | count 1
; RUN: grep 5 %t | count 1
; RUN: grep 7 %t | count 1
Modified: llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll (original)
+++ llvm/trunk/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts -o - | llc -no-integrated-as -o - | grep bork_directive | wc -l | grep 2
+; RUN: opt < %s -O3 -o - | llc -no-integrated-as -o - | grep bork_directive | wc -l | grep 2
;; We don't want branch folding to fold asm directives.
Modified: llvm/trunk/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll Thu Oct 16 15:00:02 2014
@@ -1,5 +1,5 @@
; RUN: opt < %s -instcombine -S | not grep call
-; RUN: opt < %s -std-compile-opts -S | not grep xyz
+; RUN: opt < %s -O3 -S | not grep xyz
target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-v64:64:64-v128:128:128"
@.str = internal constant [4 x i8] c"xyz\00" ; <[4 x i8]*> [#uses=1]
Modified: llvm/trunk/test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll (original)
+++ llvm/trunk/test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll Thu Oct 16 15:00:02 2014
@@ -1,4 +1,4 @@
-; RUN: opt < %s -std-compile-opts -S | grep volatile | count 3
+; RUN: opt < %s -O3 -S | grep volatile | count 3
; PR1520
; Don't promote load volatiles/stores. This is really needed to handle setjmp/lonjmp properly.
Modified: llvm/trunk/tools/bugpoint/bugpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/bugpoint.cpp?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/bugpoint.cpp (original)
+++ llvm/trunk/tools/bugpoint/bugpoint.cpp Thu Oct 16 15:00:02 2014
@@ -63,10 +63,6 @@ static cl::list<const PassInfo*, bool, P
PassList(cl::desc("Passes available:"), cl::ZeroOrMore);
static cl::opt<bool>
-StandardCompileOpts("std-compile-opts",
- cl::desc("Include the standard compile time optimizations"));
-
-static cl::opt<bool>
StandardLinkOpts("std-link-opts",
cl::desc("Include the standard link time optimizations"));
@@ -170,12 +166,6 @@ int main(int argc, char **argv) {
if (D.addSources(InputFilenames)) return 1;
AddToDriver PM(D);
- if (StandardCompileOpts) {
- PassManagerBuilder Builder;
- Builder.OptLevel = 3;
- Builder.Inliner = createFunctionInliningPass();
- Builder.populateModulePassManager(PM);
- }
if (StandardLinkOpts) {
PassManagerBuilder Builder;
Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Thu Oct 16 15:00:02 2014
@@ -109,10 +109,6 @@ DisableOptimizations("disable-opt",
cl::desc("Do not run any optimization passes"));
static cl::opt<bool>
-StandardCompileOpts("std-compile-opts",
- cl::desc("Include the standard compile time optimizations"));
-
-static cl::opt<bool>
StandardLinkOpts("std-link-opts",
cl::desc("Include the standard link time optimizations"));
@@ -233,26 +229,6 @@ static void AddOptimizationPasses(PassMa
Builder.populateModulePassManager(MPM);
}
-static void AddStandardCompilePasses(PassManagerBase &PM) {
- PM.add(createVerifierPass()); // Verify that input is correct
-
- // If the -strip-debug command line option was specified, do it.
- if (StripDebug)
- addPass(PM, createStripSymbolsPass(true));
-
- // Verify debug info only after it's (possibly) stripped.
- PM.add(createDebugInfoVerifierPass());
-
- if (DisableOptimizations) return;
-
- // -std-compile-opts adds the same module passes as -O3.
- PassManagerBuilder Builder;
- if (!DisableInline)
- Builder.Inliner = createFunctionInliningPass();
- Builder.OptLevel = 3;
- Builder.populateModulePassManager(PM);
-}
-
static void AddStandardLinkPasses(PassManagerBase &PM) {
PassManagerBuilder Builder;
Builder.VerifyInput = true;
@@ -479,21 +455,12 @@ int main(int argc, char **argv) {
NoOutput = true;
}
- // If the -strip-debug command line option was specified, add it. If
- // -std-compile-opts was also specified, it will handle StripDebug.
- if (StripDebug && !StandardCompileOpts)
+ // If the -strip-debug command line option was specified, add it.
+ if (StripDebug)
addPass(Passes, createStripSymbolsPass(true));
// Create a new optimization pass for each one specified on the command line
for (unsigned i = 0; i < PassList.size(); ++i) {
- // Check to see if -std-compile-opts was specified before this option. If
- // so, handle it.
- if (StandardCompileOpts &&
- StandardCompileOpts.getPosition() < PassList.getPosition(i)) {
- AddStandardCompilePasses(Passes);
- StandardCompileOpts = false;
- }
-
if (StandardLinkOpts &&
StandardLinkOpts.getPosition() < PassList.getPosition(i)) {
AddStandardLinkPasses(Passes);
@@ -566,12 +533,6 @@ int main(int argc, char **argv) {
Passes.add(createPrintModulePass(errs()));
}
- // If -std-compile-opts was specified at the end of the pass list, add them.
- if (StandardCompileOpts) {
- AddStandardCompilePasses(Passes);
- StandardCompileOpts = false;
- }
-
if (StandardLinkOpts) {
AddStandardLinkPasses(Passes);
StandardLinkOpts = false;
Modified: llvm/trunk/utils/findmisopt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/findmisopt?rev=219951&r1=219950&r2=219951&view=diff
==============================================================================
--- llvm/trunk/utils/findmisopt (original)
+++ llvm/trunk/utils/findmisopt Thu Oct 16 15:00:02 2014
@@ -74,8 +74,8 @@ echo "Unoptimized program: $prog"
echo " Optimized program: $optprog"
# Define the list of optimizations to run. This comprises the same set of
-# optimizations that opt -std-compile-opts and gccld run, in the same order.
-opt_switches=`llvm-as < /dev/null -o - | opt -std-compile-opts -disable-output -debug-pass=Arguments 2>&1 | sed 's/Pass Arguments: //'`
+# optimizations that opt -O3 runs, in the same order.
+opt_switches=`llvm-as < /dev/null -o - | opt -O3 -disable-output -debug-pass=Arguments 2>&1 | sed 's/Pass Arguments: //'`
all_switches="$opt_switches"
echo "Passes : $all_switches"
More information about the llvm-commits
mailing list