[PATCH] D152098: [MC] Add MCRegisterInfo::regunits for iteration over register units

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 02:18:34 PDT 2023


barannikov88 added a comment.

In D152098#4423857 <https://reviews.llvm.org/D152098#4423857>, @foad wrote:

>> How close are we to being able to remove the old MCRegUnitIterator?
>
> Sorry, I misunderstood. You are not adding a new regunit iterator, so there is no "old" one to remove.

I am guessing you meant getting rid of the old approach -- constructing an iterator directly from Reg and TRI
and calling `isValid()` for determining whether we can iterate further. That is, make the iterators more STL-like.
There is only a dozen of such uses left, half of them in MachineCopyPropagation.cpp.
I didn't address them in this patch because they require non-straightforward changes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152098/new/

https://reviews.llvm.org/D152098



More information about the llvm-commits mailing list