mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
Delete -std-compile-opts.
These days -std-compile-opts was just a silly alias for -O3. llvm-svn: 219951
This commit is contained in:
parent
4683c5ccbb
commit
253081a9b6
@ -62,27 +62,14 @@ OPTIONS
|
|||||||
available. The order in which the options occur on the command line are the
|
available. The order in which the options occur on the command line are the
|
||||||
order in which they are executed (within pass constraints).
|
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
|
.. option:: -disable-inlining
|
||||||
|
|
||||||
This option is only meaningful when :option:`-std-compile-opts` is given. It
|
This option simply removes the inlining pass from the standard list.
|
||||||
simply removes the inlining pass from the standard list.
|
|
||||||
|
|
||||||
.. option:: -disable-opt
|
.. option:: -disable-opt
|
||||||
|
|
||||||
This option is only meaningful when :option:`-std-compile-opts` is given. It
|
This option is only meaningful when :option:`-std-link-opts` is given. It
|
||||||
disables most, but not all, of the :option:`-std-compile-opts`. The ones that
|
disables most passes.
|
||||||
remain are :option:`-verify`, :option:`-lower-setjmp`, and
|
|
||||||
:option:`-funcresolve`.
|
|
||||||
|
|
||||||
.. option:: -strip-debug
|
.. option:: -strip-debug
|
||||||
|
|
||||||
@ -95,9 +82,7 @@ OPTIONS
|
|||||||
This option causes opt to add a verify pass after every pass otherwise
|
This option causes opt to add a verify pass after every pass otherwise
|
||||||
specified on the command line (including :option:`-verify`). This is useful
|
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
|
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
|
it is not clear which pass is doing it.
|
||||||
:option:`-std-compile-opts` and :option:`-verify-each` can quickly track down
|
|
||||||
this kind of problem.
|
|
||||||
|
|
||||||
.. option:: -stats
|
.. option:: -stats
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ Then run:
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. 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
|
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
|
then it should crash in the same way as clang. If it doesn't crash, please
|
||||||
|
@ -733,7 +733,7 @@ f (unsigned long a, unsigned long b, unsigned long c)
|
|||||||
return ((a & (c - 1)) != 0) | ((b & (c - 1)) != 0);
|
return ((a & (c - 1)) != 0) | ((b & (c - 1)) != 0);
|
||||||
}
|
}
|
||||||
Both should combine to ((a|b) & (c-1)) != 0. Currently not optimized with
|
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, unsigned long end)
|
|||||||
}
|
}
|
||||||
The expression should optimize to something like
|
The expression should optimize to something like
|
||||||
"!((start|end)&~PMD_MASK). Currently not optimized with "clang
|
"!((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;
|
return (abs(x)) >= 0;
|
||||||
}
|
}
|
||||||
This should optimize to x == INT_MIN. (With -fwrapv.) Currently not
|
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
|
All should simplify to a single comparison. All of these are
|
||||||
currently not optimized with "clang -emit-llvm-bc | opt
|
currently not optimized with "clang -emit-llvm-bc | opt
|
||||||
-std-compile-opts".
|
-O3".
|
||||||
|
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
From GCC Bug 32605:
|
From GCC Bug 32605:
|
||||||
int c(int* x) {return (char*)x+2 == (char*)x;}
|
int c(int* x) {return (char*)x+2 == (char*)x;}
|
||||||
Should combine to 0. Currently not optimized with "clang
|
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;}
|
int a(unsigned b) {return ((b << 31) | (b << 30)) >> 31;}
|
||||||
Should be combined to "((b >> 1) | b) & 1". Currently not optimized
|
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);}
|
unsigned a(unsigned x, unsigned y) { return x | (y & 1) | (y & 2);}
|
||||||
Should combine to "x | (y & 3)". Currently not optimized with "clang
|
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);}
|
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
|
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;}
|
int a(int a,int b) {return (~(a|b))|a;}
|
||||||
Should fold to "a|~b". Currently not optimized with "clang
|
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);}
|
int a(int a, int b) {return (a&&b) || (a&&!b);}
|
||||||
Should fold to "a". Currently not optimized with "clang -emit-llvm-bc
|
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);}
|
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
|
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);}
|
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
|
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);}
|
int a(int x) {return x | ((x & 8) ^ 8);}
|
||||||
Should combine to x | 8. Currently not optimized with "clang
|
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);}
|
int a(int x) {return x ^ ((x & 8) ^ 8);}
|
||||||
Should also combine to x | 8. Currently not optimized with "clang
|
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;}
|
int a(int x) {return ((x | -9) ^ 8) & x;}
|
||||||
Should combine to x & -9. Currently not optimized with "clang
|
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;}
|
unsigned a(unsigned a) {return a * 0x11111111 >> 28 & 1;}
|
||||||
Should combine to "a * 0x88888888 >> 31". Currently not optimized
|
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();}
|
unsigned a(char* x) {if ((*x & 32) == 0) return b();}
|
||||||
There's an unnecessary zext in the generated code with "clang
|
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);}
|
unsigned a(unsigned long long x) {return 40 * (x >> 1);}
|
||||||
Should combine to "20 * (((unsigned)x) & -2)". Currently not
|
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; }
|
int g(int x) { return (x - 10) < 0; }
|
||||||
Should combine to "x <= 9" (the sub has nsw). Currently not
|
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; }
|
int g(int x) { return (x + 10) < 0; }
|
||||||
Should combine to "x < -10" (the add has nsw). Currently not
|
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 f(int i, int j) { return i < j + 1; }
|
||||||
int g(int i, int j) { return j > i - 1; }
|
int g(int i, int j) { return j > i - 1; }
|
||||||
Should combine to "i <= j" (the add/sub has nsw). Currently not
|
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; }
|
unsigned f(unsigned x) { return ((x & 7) + 1) & 15; }
|
||||||
The & 15 part should be optimized away, it doesn't change the result. Currently
|
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".
|
||||||
|
|
||||||
//===---------------------------------------------------------------------===//
|
//===---------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: opt < %s -std-compile-opts -S | FileCheck %s
|
; RUN: opt < %s -O3 -S | FileCheck %s
|
||||||
; ModuleID = 'small2.c'
|
; 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 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"
|
target triple = "i386-apple-darwin8"
|
||||||
|
@ -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
|
; 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"
|
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"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: opt < %s -std-compile-opts | llc > %t
|
; RUN: opt < %s -O3 | llc > %t
|
||||||
; ModuleID = 'ld3.c'
|
; 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 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"
|
target triple = "powerpc-apple-darwin8"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; RUN: opt < %s -std-compile-opts | \
|
; RUN: opt < %s -O3 | \
|
||||||
; RUN: llc -mtriple=thumbv7-apple-darwin10 -mattr=+neon | FileCheck %s
|
; 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 {
|
define void @fred(i32 %three_by_three, i8* %in, double %dt1, i32 %x_size, i32 %y_size, i8* %bp) nounwind {
|
||||||
|
@ -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'
|
; 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 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"
|
target triple = "i686-apple-darwin8"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
; RUN: llc -mtriple x86_64-pc-mingw32 -O0 < %s | FileCheck %s -check-prefix=FAST
|
; RUN: llc -mtriple x86_64-pc-mingw32 -O0 < %s | FileCheck %s -check-prefix=FAST
|
||||||
; PR6275
|
; 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
|
@Var1 = external dllimport global i32
|
||||||
@Var2 = available_externally dllimport unnamed_addr constant i32 1
|
@Var2 = available_externally dllimport unnamed_addr constant i32 1
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
; RUN: llc -mtriple i386-pc-mingw32 -O0 < %s | FileCheck %s -check-prefix=FAST
|
; RUN: llc -mtriple i386-pc-mingw32 -O0 < %s | FileCheck %s -check-prefix=FAST
|
||||||
; PR6275
|
; 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
|
@Var1 = external dllimport global i32
|
||||||
@Var2 = available_externally dllimport unnamed_addr constant i32 1
|
@Var2 = available_externally dllimport unnamed_addr constant i32 1
|
||||||
|
@ -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 2147027116 %t | count 3
|
||||||
; RUN: grep 2147228864 %t | count 3
|
; RUN: grep 2147228864 %t | count 3
|
||||||
; RUN: grep 2146502828 %t | count 3
|
; RUN: grep 2146502828 %t | count 3
|
||||||
|
@ -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 undef %t | count 1
|
||||||
; RUN: grep 5 %t | count 1
|
; RUN: grep 5 %t | count 1
|
||||||
; RUN: grep 7 %t | count 1
|
; RUN: grep 7 %t | count 1
|
||||||
|
@ -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.
|
;; We don't want branch folding to fold asm directives.
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
; RUN: opt < %s -instcombine -S | not grep call
|
; 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"
|
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]
|
@.str = internal constant [4 x i8] c"xyz\00" ; <[4 x i8]*> [#uses=1]
|
||||||
|
@ -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
|
; PR1520
|
||||||
; Don't promote load volatiles/stores. This is really needed to handle setjmp/lonjmp properly.
|
; Don't promote load volatiles/stores. This is really needed to handle setjmp/lonjmp properly.
|
||||||
|
|
||||||
|
@ -62,10 +62,6 @@ UseValgrind("enable-valgrind",
|
|||||||
static cl::list<const PassInfo*, bool, PassNameParser>
|
static cl::list<const PassInfo*, bool, PassNameParser>
|
||||||
PassList(cl::desc("Passes available:"), cl::ZeroOrMore);
|
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>
|
static cl::opt<bool>
|
||||||
StandardLinkOpts("std-link-opts",
|
StandardLinkOpts("std-link-opts",
|
||||||
cl::desc("Include the standard link time optimizations"));
|
cl::desc("Include the standard link time optimizations"));
|
||||||
@ -170,12 +166,6 @@ int main(int argc, char **argv) {
|
|||||||
if (D.addSources(InputFilenames)) return 1;
|
if (D.addSources(InputFilenames)) return 1;
|
||||||
|
|
||||||
AddToDriver PM(D);
|
AddToDriver PM(D);
|
||||||
if (StandardCompileOpts) {
|
|
||||||
PassManagerBuilder Builder;
|
|
||||||
Builder.OptLevel = 3;
|
|
||||||
Builder.Inliner = createFunctionInliningPass();
|
|
||||||
Builder.populateModulePassManager(PM);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (StandardLinkOpts) {
|
if (StandardLinkOpts) {
|
||||||
PassManagerBuilder Builder;
|
PassManagerBuilder Builder;
|
||||||
|
@ -108,10 +108,6 @@ static cl::opt<bool>
|
|||||||
DisableOptimizations("disable-opt",
|
DisableOptimizations("disable-opt",
|
||||||
cl::desc("Do not run any optimization passes"));
|
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>
|
static cl::opt<bool>
|
||||||
StandardLinkOpts("std-link-opts",
|
StandardLinkOpts("std-link-opts",
|
||||||
cl::desc("Include the standard link time optimizations"));
|
cl::desc("Include the standard link time optimizations"));
|
||||||
@ -233,26 +229,6 @@ static void AddOptimizationPasses(PassManagerBase &MPM,FunctionPassManager &FPM,
|
|||||||
Builder.populateModulePassManager(MPM);
|
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) {
|
static void AddStandardLinkPasses(PassManagerBase &PM) {
|
||||||
PassManagerBuilder Builder;
|
PassManagerBuilder Builder;
|
||||||
Builder.VerifyInput = true;
|
Builder.VerifyInput = true;
|
||||||
@ -479,21 +455,12 @@ int main(int argc, char **argv) {
|
|||||||
NoOutput = true;
|
NoOutput = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the -strip-debug command line option was specified, add it. If
|
// If the -strip-debug command line option was specified, add it.
|
||||||
// -std-compile-opts was also specified, it will handle StripDebug.
|
if (StripDebug)
|
||||||
if (StripDebug && !StandardCompileOpts)
|
|
||||||
addPass(Passes, createStripSymbolsPass(true));
|
addPass(Passes, createStripSymbolsPass(true));
|
||||||
|
|
||||||
// Create a new optimization pass for each one specified on the command line
|
// Create a new optimization pass for each one specified on the command line
|
||||||
for (unsigned i = 0; i < PassList.size(); ++i) {
|
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 &&
|
if (StandardLinkOpts &&
|
||||||
StandardLinkOpts.getPosition() < PassList.getPosition(i)) {
|
StandardLinkOpts.getPosition() < PassList.getPosition(i)) {
|
||||||
AddStandardLinkPasses(Passes);
|
AddStandardLinkPasses(Passes);
|
||||||
@ -566,12 +533,6 @@ int main(int argc, char **argv) {
|
|||||||
Passes.add(createPrintModulePass(errs()));
|
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) {
|
if (StandardLinkOpts) {
|
||||||
AddStandardLinkPasses(Passes);
|
AddStandardLinkPasses(Passes);
|
||||||
StandardLinkOpts = false;
|
StandardLinkOpts = false;
|
||||||
|
@ -74,8 +74,8 @@ echo "Unoptimized program: $prog"
|
|||||||
echo " Optimized program: $optprog"
|
echo " Optimized program: $optprog"
|
||||||
|
|
||||||
# Define the list of optimizations to run. This comprises the same set of
|
# 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.
|
# optimizations that opt -O3 runs, 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: //'`
|
opt_switches=`llvm-as < /dev/null -o - | opt -O3 -disable-output -debug-pass=Arguments 2>&1 | sed 's/Pass Arguments: //'`
|
||||||
all_switches="$opt_switches"
|
all_switches="$opt_switches"
|
||||||
echo "Passes : $all_switches"
|
echo "Passes : $all_switches"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user