[PATCH] D70566: [MCRegInfo] Add sub_and_superregs_inclusive iterator range.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 13:53:37 PST 2019
fhahn created this revision.
fhahn added reviewers: evandro, qcolombet, paquette, MatzeB, arsenm.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70566
Files:
llvm/include/llvm/MC/MCRegisterInfo.h
Index: llvm/include/llvm/MC/MCRegisterInfo.h
===================================================================
--- llvm/include/llvm/MC/MCRegisterInfo.h
+++ llvm/include/llvm/MC/MCRegisterInfo.h
@@ -324,6 +324,14 @@
return make_range({Reg, this}, mc_superreg_iterator::end());
}
+ /// Return an iterator range over all sub- and super-registers of \p Reg,
+ /// including \p Reg.
+ detail::concat_range<const MCPhysReg, iterator_range<mc_subreg_iterator>,
+ iterator_range<mc_superreg_iterator>>
+ sub_and_superregs_inclusive(MCRegister Reg) const {
+ return concat<const MCPhysReg>(subregs_inclusive(Reg), superregs(Reg));
+ }
+
// These iterators are allowed to sub-class DiffListIterator and access
// internal list pointers.
friend class MCSubRegIterator;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70566.230530.patch
Type: text/x-patch
Size: 810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191121/54cb5802/attachment.bin>
More information about the llvm-commits
mailing list