[PATCH] D70566: [MCRegInfo] Add sub_and_superregs_inclusive iterator range.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 01:54:22 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb48b4ed1a0bd: [MCRegInfo] Add sub_and_superregs_inclusive iterator range. (authored by fhahn).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70566/new/
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.233281.patch
Type: text/x-patch
Size: 810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191211/d6085ae0/attachment-0001.bin>
More information about the llvm-commits
mailing list