[llvm-branch-commits] [llvm-gcc-branch] r84580 - /llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-backend.cpp
Bill Wendling
isanbard at gmail.com
Mon Oct 19 17:52:53 PDT 2009
Author: void
Date: Mon Oct 19 19:52:53 2009
New Revision: 84580
URL: http://llvm.org/viewvc/llvm-project?rev=84580&view=rev
Log:
$ svn merge -c 84274 https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk
--- Merging r84274 into '.':
U gcc/llvm-backend.cpp
Modified:
llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-backend.cpp?rev=84580&r1=84579&r2=84580&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-backend.cpp Mon Oct 19 19:52:53 2009
@@ -655,13 +655,14 @@
FunctionPassManager *PM = PerFunctionPasses;
HasPerFunctionPasses = true;
- CodeGenOpt::Level OptLevel = CodeGenOpt::Default;
-
- switch (optimize) {
- default: break;
- case 0: OptLevel = CodeGenOpt::None; break;
- case 3: OptLevel = CodeGenOpt::Aggressive; break;
- }
+ CodeGenOpt::Level OptLevel = CodeGenOpt::Default; // -O2, -Os, and -Oz
+ if (optimize == 0)
+ OptLevel = CodeGenOpt::None;
+ else if (optimize == 1)
+ OptLevel = CodeGenOpt::Less;
+ else if (optimize == 3)
+ // -O3 and above.
+ OptLevel = CodeGenOpt::Aggressive;
// Normal mode, emit a .s file by running the code generator.
// Note, this also adds codegenerator level optimization passes.
More information about the llvm-branch-commits
mailing list