[llvm] [CodeGen] Allocate RegAllocHints map lazily (PR #102186)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 23:26:48 PDT 2024


================
@@ -801,6 +801,7 @@ class MachineRegisterInfo {
   /// of an earlier hint it will be overwritten.
   void setRegAllocationHint(Register VReg, unsigned Type, Register PrefReg) {
     assert(VReg.isVirtual());
+    RegAllocHints.grow(Register::index2VirtReg(getNumVirtRegs()));
----------------
aengelke wrote:

Good catch, opened #102273

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


More information about the llvm-commits mailing list