aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Driver/clang.cpp6
-rw-r--r--include/clang/Driver/CompileOptions.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 3cf654f458..696e8842c9 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -1142,7 +1142,11 @@ OptLevel("O", llvm::cl::Prefix,
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;
}
//===----------------------------------------------------------------------===//
diff --git a/include/clang/Driver/CompileOptions.h b/include/clang/Driver/CompileOptions.h
index 560944566a..50865536dc 100644
--- a/include/clang/Driver/CompileOptions.h
+++ b/include/clang/Driver/CompileOptions.h
@@ -34,8 +34,8 @@ public:
CompileOptions() {
OptimizationLevel = 0;
OptimizeSize = 0;
- UnitAtATime = InlineFunctions = SimplifyLibCalls = 1;
- UnrollLoops = 1;
+ UnitAtATime = 1;
+ InlineFunctions = SimplifyLibCalls = UnrollLoops = 0;
VerifyModule = 1;
}
};