forked from OSchip/llvm-project
Choose CompileOptions (optimization passes) to match llvm-gcc more
closely. llvm-svn: 58361
This commit is contained in:
parent
dc4030454d
commit
a3730a23a2
|
@ -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;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -34,8 +34,8 @@ public:
|
|||
CompileOptions() {
|
||||
OptimizationLevel = 0;
|
||||
OptimizeSize = 0;
|
||||
UnitAtATime = InlineFunctions = SimplifyLibCalls = 1;
|
||||
UnrollLoops = 1;
|
||||
UnitAtATime = 1;
|
||||
InlineFunctions = SimplifyLibCalls = UnrollLoops = 0;
|
||||
VerifyModule = 1;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue