[llvm-commits] [llvm] r84349 - /llvm/trunk/tools/llvmc/plugins/Base/Base.td.in
Mikhail Glushenkov
foldr at codedgers.com
Sat Oct 17 13:08:04 PDT 2009
Author: foldr
Date: Sat Oct 17 15:07:49 2009
New Revision: 84349
URL: http://llvm.org/viewvc/llvm-project?rev=84349&view=rev
Log:
-O[0-3] options should be also forwarded to opt and llc.
This will require implementing OptionPreprocessor to forbid invalid invocations
such as 'llvmc -O1 -O2'.
Modified:
llvm/trunk/tools/llvmc/plugins/Base/Base.td.in
Modified: llvm/trunk/tools/llvmc/plugins/Base/Base.td.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/plugins/Base/Base.td.in?rev=84349&r1=84348&r2=84349&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/plugins/Base/Base.td.in (original)
+++ llvm/trunk/tools/llvmc/plugins/Base/Base.td.in Sat Oct 17 15:07:49 2009
@@ -24,6 +24,14 @@
(help "Stop after checking the input for syntax errors")),
(switch_option "opt",
(help "Enable opt")),
+ (switch_option "O0",
+ (help "Turn off optimization")),
+ (switch_option "O1",
+ (help "Optimization level 1")),
+ (switch_option "O2",
+ (help "Optimization level 2")),
+ (switch_option "O3",
+ (help "Optimization level 3")),
(switch_option "S",
(help "Stop after compilation, do not assemble")),
(switch_option "c",
@@ -87,6 +95,9 @@
(not_empty "include"), (forward "include"),
(not_empty "I"), (forward "I"),
(not_empty "D"), (forward "D"),
+ (switch_on "O1"), (forward "O1"),
+ (switch_on "O2"), (forward "O2"),
+ (switch_on "O3"), (forward "O3"),
(not_empty "MF"), (forward "MF"),
(not_empty "MT"), (forward "MT"))),
(sink)
@@ -103,7 +114,10 @@
[(in_language "llvm-bitcode"),
(out_language "llvm-bitcode"),
(output_suffix "bc"),
- (actions (case (not_empty "Wo,"), (unpack_values "Wo,"))),
+ (actions (case (not_empty "Wo,"), (unpack_values "Wo,"),
+ (switch_on "O1"), (forward "O1"),
+ (switch_on "O2"), (forward "O2"),
+ (switch_on "O3"), (forward "O3"))),
(cmd_line "opt -f $INFILE -o $OUTFILE")
]>;
@@ -132,6 +146,10 @@
(cmd_line "llc -f $INFILE -o $OUTFILE"),
(actions (case
(switch_on "S"), (stop_compilation),
+ (switch_on "O0"), (forward "O0"),
+ (switch_on "O1"), (forward "O1"),
+ (switch_on "O2"), (forward "O2"),
+ (switch_on "O3"), (forward "O3"),
(not_empty "Wllc,"), (unpack_values "Wllc,")))
]>;
More information about the llvm-commits
mailing list