r268509 - Do not disable completely loop unroll when optimizing for size.
Marianne Mailhot-Sarrasin via cfe-commits
cfe-commits at lists.llvm.org
Wed May 4 08:26:29 PDT 2016
Author: mamai
Date: Wed May 4 10:26:28 2016
New Revision: 268509
URL: http://llvm.org/viewvc/llvm-project?rev=268509&view=rev
Log:
Do not disable completely loop unroll when optimizing for size.
Let the loop unroll pass handle /Os. It already checks that option and adjust its thresholds accordingly. Also, will allow the #pragma unroll to have an effect in /Os.
Differential Revision: http://reviews.llvm.org/D19827
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=268509&r1=268508&r2=268509&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed May 4 10:26:28 2016
@@ -513,7 +513,7 @@ static bool ParseCodeGenArgs(CodeGenOpti
getAllNoBuiltinFuncValues(Args, Opts.NoBuiltinFuncs);
Opts.UnrollLoops =
Args.hasFlag(OPT_funroll_loops, OPT_fno_unroll_loops,
- (Opts.OptimizationLevel > 1 && !Opts.OptimizeSize));
+ (Opts.OptimizationLevel > 1));
Opts.RerollLoops = Args.hasArg(OPT_freroll_loops);
Opts.DisableIntegratedAS = Args.hasArg(OPT_fno_integrated_as);
More information about the cfe-commits
mailing list