[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:21:17 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;
+
----------------
@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.
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