diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-10-16 21:02:20 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-10-16 21:02:20 +0000 |
commit | bf57b52ba424bbaaa6e2d25dd4df731deb59f959 (patch) | |
tree | 547a1d8838ea2587ede5d4058fe47e87d0a6bbb1 | |
parent | b00f236b03ea57520f94823780896ebdbc5d8bdc (diff) | |
download | external_llvm-bf57b52ba424bbaaa6e2d25dd4df731deb59f959.zip external_llvm-bf57b52ba424bbaaa6e2d25dd4df731deb59f959.tar.gz external_llvm-bf57b52ba424bbaaa6e2d25dd4df731deb59f959.tar.bz2 |
Add a CodeGenOpt::Less level to match -O1. It'll be used by clients which do not want post-regalloc scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84272 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetMachine.h | 7 | ||||
-rw-r--r-- | tools/llc/llc.cpp | 2 | ||||
-rw-r--r-- | tools/lli/lli.cpp | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index 92b648c..1104635 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -74,9 +74,10 @@ namespace FileModel { // Code generation optimization level. namespace CodeGenOpt { enum Level { - Default, - None, - Aggressive + None, // -O0 + Less, // -O1 + Default, // -O2, -Os + Aggressive // -O3 }; } diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index b94e5fb..84e6867 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -298,7 +298,7 @@ int main(int argc, char **argv) { return 1; case ' ': break; case '0': OLvl = CodeGenOpt::None; break; - case '1': + case '1': OLvl = CodeGenOpt::Less; break; case '2': OLvl = CodeGenOpt::Default; break; case '3': OLvl = CodeGenOpt::Aggressive; break; } diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index e5c1070..723d6a8 100644 --- a/tools/lli/lli.cpp +++ b/tools/lli/lli.cpp @@ -148,7 +148,7 @@ int main(int argc, char **argv, char * const *envp) { return 1; case ' ': break; case '0': OLvl = CodeGenOpt::None; break; - case '1': + case '1': OLvl = CodeGenOpt::Less; break; case '2': OLvl = CodeGenOpt::Default; break; case '3': OLvl = CodeGenOpt::Aggressive; break; } |