[PATCH] D112882: [NFC][Regalloc] Ensure Query::interferingVRegs is accurate.

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 30 20:52:08 PDT 2021


mtrofin created this revision.
mtrofin added a reviewer: qcolombet.
Herald added subscribers: hiraditya, MatzeB.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

To correctly use Query, one had to first call collectInterferingVRegs to
pre-cache the query result, then call interferingVRegs. Failing the
former, interferingVRegs could be stale. This did cause a bug which was
addressed in D98232 <https://reviews.llvm.org/D98232>, but the underlying usability issue of the Query API
wasn't.

This patch addresses the latter by making collectInterferingVRegs an
implementation detail, and having interferingVRegs play both roles. One
side-effect of this is that interferingVRegs is not const anymore.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D112882

Files:
  llvm/include/llvm/CodeGen/LiveIntervalUnion.h
  llvm/lib/CodeGen/LiveIntervalUnion.cpp
  llvm/lib/CodeGen/RegAllocBasic.cpp
  llvm/lib/CodeGen/RegAllocGreedy.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112882.383632.patch
Type: text/x-patch
Size: 7896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211031/656ecc1f/attachment.bin>


More information about the llvm-commits mailing list