[PATCH] D152655: [MC] Merge MC[Sub,Super]RegIterator with mc_[sub,super]_reg_iterator
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 17:37:30 PDT 2023
barannikov88 added inline comments.
================
Comment at: llvm/include/llvm/MC/MCRegisterInfo.h:511
+ // Cache the current value, so that we can return a reference to it.
+ MCPhysReg Val;
+
----------------
barannikov88 wrote:
> @dblaikie Could you comment on this?
> This requires type type to be default constructible. In D152098 I add MCRegUnit that does not have a good default value. Maybe I should instead return a proxy object from `operator*` that will hold the value? Would that be correct w.r.t. iterator requirements? Probably factor the proxy out into a common (templated) base class, too.
>
Ah I guess this won't change a thing, I would still need to be able to construct the proxy from some value, which I don't have in case of the end iterator.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152655/new/
https://reviews.llvm.org/D152655
More information about the llvm-commits
mailing list