diff options
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index f144c99cdd4..237cf184d8b 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -3277,8 +3277,9 @@ void RegisterCoalescer::mergeSubRangeInto(LiveInterval &LI, bool RegisterCoalescer::isHighCostLiveInterval(LiveInterval &LI) { if (LI.valnos.size() < LargeIntervalSizeThreshold) return false; - if (LargeLIVisitCounter[LI.reg] < LargeIntervalFreqThreshold) { - LargeLIVisitCounter[LI.reg]++; + auto &counter = LargeLIVisitCounter[LI.reg]; + if (counter < LargeIntervalFreqThreshold) { + counter++; return false; } return true; |