[llvm] CodeGen: Eliminate dynamic relocations in the register superclass tables. (PR #119122)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 8 08:48:56 PST 2024


================
@@ -42,11 +42,27 @@ class VirtRegMap;
 class LiveIntervals;
 class LiveInterval;
 
+/// TargetSuperClassIterator enumerates all super-registers of RegClass.
+class TargetSuperClassIterator
+    : public iterator_adaptor_base<TargetSuperClassIterator, const unsigned *> {
+public:
+  /// Constructs an end iterator.
+  TargetSuperClassIterator() = default;
+
+  TargetSuperClassIterator(const unsigned *V) { I = V; }
+
+  const unsigned &operator*() const { return *I; }
----------------
s-barannikov wrote:

It should return `const TargetRegisterClass &`

https://github.com/llvm/llvm-project/pull/119122


More information about the llvm-commits mailing list