[PATCH] D112129: [FuncSpec] Enable it only with -O3
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 3 07:06:23 PDT 2021
SjoerdMeijer added a comment.
Ah, I never pressed the submit button... :-(
See my comment inline.
================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1402
- if (EnableFunctionSpecialization)
+ if (EnableFunctionSpecialization && Level.getSpeedupLevel() > 2)
MPM.addPass(FunctionSpecializationPass());
----------------
ChuanqiXu wrote:
> Do we need to consider SizeLevel here?
I think this is fine as it is, because if the Speed level is 3, we know we are not optimising for size:
https://github.com/llvm/llvm-project/blob/a3c05982ac05637a8f40207db83c04a1710033d5/llvm/include/llvm/Passes/OptimizationLevel.h#L32
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112129/new/
https://reviews.llvm.org/D112129
More information about the llvm-commits
mailing list