[llvm-commits] [dragonegg] r132846 - /dragonegg/trunk/src/Backend.cpp
Duncan Sands
baldrick at free.fr
Fri Jun 10 07:17:24 PDT 2011
Author: baldrick
Date: Fri Jun 10 09:17:24 2011
New Revision: 132846
URL: http://llvm.org/viewvc/llvm-project?rev=132846&view=rev
Log:
Try a radical experiment: if GCC optimizations are run, don't try to run
any heavy IR level optimizations: just do some per-function cleanup.
Modified:
dragonegg/trunk/src/Backend.cpp
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=132846&r1=132845&r2=132846&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Fri Jun 10 09:17:24 2011
@@ -225,7 +225,11 @@
/// ModuleOptLevel - The optimization level to be used by the module level IR
/// optimizers.
static int ModuleOptLevel() {
- return LLVMIROptimizeArg >= 0 ? LLVMIROptimizeArg : optimize;
+ if (LLVMIROptimizeArg >= 0)
+ return LLVMIROptimizeArg;
+ if (EnableGCCOptimizations)
+ return 0;
+ return optimize;
}
// SizeOfGlobalMatchesDecl - Whether the size of the given global value is the
More information about the llvm-commits
mailing list