[Inliner] Optimize shouldBeDeferred

This has some minor optimizations to shouldBeDeferred. This is not
strictly NFC because the early exit inside the loop assumes
TotalSecondaryCost is monotonically non-decreasing, which is not true if
the threshold used by CostAnalyzer is negative. AFAICT the thresholds do
not go below 0 for the default values of the various options we use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350456 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed