Choose CompileOptions (optimization passes) to match llvm-gcc more
closely.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58361 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/clang.cpp b/Driver/clang.cpp
index 3cf654f..696e884 100644
--- a/Driver/clang.cpp
+++ b/Driver/clang.cpp
@@ -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;
 }
 
 //===----------------------------------------------------------------------===//