From bf57b52ba424bbaaa6e2d25dd4df731deb59f959 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 16 Oct 2009 21:02:20 +0000 Subject: 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 --- include/llvm/Target/TargetMachine.h | 7 ++++--- tools/llc/llc.cpp | 2 +- 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; } -- cgit v1.1