[llvm] CodeGen: Eliminate dynamic relocations in the register superclass tables. (PR #119122)
Owen Anderson via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 03:07:32 PST 2024
================
@@ -172,7 +172,8 @@ X86RegisterInfo::getLargestLegalSuperClass(const TargetRegisterClass *RC,
if (getRegSizeInBits(*Super) == getRegSizeInBits(*RC))
return Super;
}
- Super = *I++;
+ Super = I.isValid() ? getRegClass(*I) : nullptr;
+ ++I;
----------------
resistor wrote:
In practice it won't break anything here, since the iterator is just a pointer. This whole code path is somewhat awkward, but I don't want to mess with it too much without understanding the underlying logic.
https://github.com/llvm/llvm-project/pull/119122
More information about the llvm-commits
mailing list