NFC in preparation of D60740.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/InlineCost.cpp | ||
---|---|---|
247 ↗ | (On Diff #195297) | I believe that both Inc and UpperBound must be of the same type as Cost (i.e. int) but the parameters of std::max() should be extended. |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
247 ↗ | (On Diff #195297) | Agree. An explicit cast to a wider type is more clear. |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
247 ↗ | (On Diff #195297) | int64_t came from cost calculations in CallAnalyzer::visitSwitchInst, which specifically uses uint64_t in many places, both for increment and upper bound. The only check that I should add here is an assert on UpperBound being positive and not exceeding INT_MAX. |