[cfe-commits] r58361 - in /cfe/trunk: Driver/clang.cpp include/clang/Driver/CompileOptions.h
Daniel Dunbar
daniel at zuster.org
Tue Oct 28 20:42:18 PDT 2008
Author: ddunbar
Date: Tue Oct 28 22:42:18 2008
New Revision: 58361
URL: http://llvm.org/viewvc/llvm-project?rev=58361&view=rev
Log:
Choose CompileOptions (optimization passes) to match llvm-gcc more
closely.
Modified:
cfe/trunk/Driver/clang.cpp
cfe/trunk/include/clang/Driver/CompileOptions.h
Modified: cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/clang.cpp?rev=58361&r1=58360&r2=58361&view=diff
==============================================================================
--- cfe/trunk/Driver/clang.cpp (original)
+++ cfe/trunk/Driver/clang.cpp Tue Oct 28 22:42:18 2008
@@ -1142,7 +1142,11 @@
static void InitializeCompileOptions(CompileOptions &Opts) {
Opts.OptimizationLevel = OptLevel;
Opts.OptimizeSize = OptSize;
- // FIXME: Wire other options.
+
+ // FIXME: There are llvm-gcc options to control these selectively.
+ Opts.InlineFunctions = (Opts.OptimizationLevel > 1);
+ Opts.UnrollLoops = (Opts.OptimizationLevel > 1 && !OptSize);
+ Opts.SimplifyLibCalls = 1;
}
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/include/clang/Driver/CompileOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CompileOptions.h?rev=58361&r1=58360&r2=58361&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CompileOptions.h (original)
+++ cfe/trunk/include/clang/Driver/CompileOptions.h Tue Oct 28 22:42:18 2008
@@ -34,8 +34,8 @@
CompileOptions() {
OptimizationLevel = 0;
OptimizeSize = 0;
- UnitAtATime = InlineFunctions = SimplifyLibCalls = 1;
- UnrollLoops = 1;
+ UnitAtATime = 1;
+ InlineFunctions = SimplifyLibCalls = UnrollLoops = 0;
VerifyModule = 1;
}
};
More information about the cfe-commits
mailing list