[llvm-commits] [dragonegg] r141945 - in /dragonegg/trunk: README src/Backend.cpp
Duncan Sands
baldrick at free.fr
Thu Oct 13 23:10:09 PDT 2011
Author: baldrick
Date: Fri Oct 14 01:10:09 2011
New Revision: 141945
URL: http://llvm.org/viewvc/llvm-project?rev=141945&view=rev
Log:
Polyhedron 2005 benchmark results show that when GCC optimizations
are enabled the level of LLVM optimization doesn't matter: -O1, -O2
and -O3 all give essentially the same code quality and more or less
the same compile time. I'm not convinced: my not very scientific
testing shows LLVM -O2 as being the sweet spot when GCC optimizes
at -O3.
Modified:
dragonegg/trunk/README
dragonegg/trunk/src/Backend.cpp
Modified: dragonegg/trunk/README
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/README?rev=141945&r1=141944&r2=141945&view=diff
==============================================================================
--- dragonegg/trunk/README (original)
+++ dragonegg/trunk/README Fri Oct 14 01:10:09 2011
@@ -112,9 +112,9 @@
-fplugin-arg-dragonegg-enable-gcc-optzns
Run the GCC tree optimizers rather than the LLVM IR optimizers (normally all
- GCC optimizations are disabled). By default this severely reduces the amount
- of LLVM IR optimization. Use -O4 to -O6 to have LLVM optimize harder, or set
- an explicit level using the -fplugin-arg-dragonegg-llvm-ir-optimize option.
+ GCC optimizations are disabled). By default this reduces the amount of LLVM
+ IR optimization. Use -O4 to have LLVM optimize harder, or explicitly set a
+ level using the -fplugin-arg-dragonegg-llvm-ir-optimize option.
-fplugin-arg-dragonegg-save-gcc-output
GCC assembler output is normally redirected to /dev/null so that it doesn't
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=141945&r1=141944&r2=141945&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Fri Oct 14 01:10:09 2011
@@ -210,13 +210,6 @@
// If the user supplied an LLVM optimization level then use it.
if (LLVMIROptimizeArg >= 0)
return LLVMIROptimizeArg;
- // If the GCC optimizers were run then tone down the LLVM optimization level:
- // GCC | LLVM
- // ----------
- // 0 | 0
- // 1 | 1 (per-function maximum)
- if (EnableGCCOptimizations)
- return (optimize + 1) / 2;
// Otherwise use the GCC optimization level.
return optimize;
}
@@ -233,12 +226,10 @@
// 0 | 0
// 1 | 0
// 2 | 1
- // 3 | 1
- // 4 | 2
- // 5 | 2
- // 6 | 3 (per-module maximum)
+ // 3 | 2
+ // 4 | 3 (per-module maximum)
if (EnableGCCOptimizations)
- return optimize / 2;
+ return optimize > 0 ? optimize - 1 : 0;
// Otherwise use the GCC optimization level.
return optimize;
}
More information about the llvm-commits
mailing list