[PATCH] D20452: Allow -inline-threshold to override default (explicitly specified/derived from opt levels) threshold
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Thu May 19 15:44:15 PDT 2016
chandlerc accepted this revision.
chandlerc added a comment.
This revision is now accepted and ready to land.
Thanks for fixing this! LGTM with the tweak below.
================
Comment at: lib/Analysis/InlineCost.cpp:624-627
@@ -623,2 +623,6 @@
Threshold = OptSizeThreshold;
+ } else {
+ // Explicitly specified -inline-threhold overrides the threshold passed to
+ // CallAnalyzer's constructor.
+ Threshold = DefaultInlineThreshold;
}
----------------
How about reversing the condition above? It seems much more natural to write
if (/* we have an explicit option */) {
// use it...
} else {
// use the thresholds
}
http://reviews.llvm.org/D20452
More information about the llvm-commits
mailing list