Before r257832, the threshold used by SimpleInliner was explicitly specified or generated from opt levels and passed to the base class Inliner's constructor. There, it was first overridden by explicitly specified -inline-threshold. The refactoring in r257832 did not preserve this behavior for all opt levels. This change brings back the original behavior.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Thanks for fixing this! LGTM with the tweak below.
lib/Analysis/InlineCost.cpp | ||
---|---|---|
624–627 ↗ | (On Diff #57867) | 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 } |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
624–627 ↗ | (On Diff #57867) | I've reversed the condition and also moved the comment at line 616 near the relevant code. |