[PATCH] D90725: [NFC] Use [MC]Register in register allocation

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 3 15:57:52 PST 2020


mtrofin accepted this revision.
mtrofin added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:474
+  MCRegister getCheapestEvicteeWeight(const AllocationOrder &Order,
+                                      LiveInterval &VirtReg, SlotIndex Start,
+                                      SlotIndex End, float *BestEvictWeight);
----------------
I can't tell what the notation is here on line 474 - is it a blank space, or?

(if you ran clang-format, it's probably fine)


================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:689
+  const Register Reg = LI->reg();
   assert(Register::isVirtualRegister(Reg) &&
          "Can only enqueue virtual registers");
----------------
nit: can you also change the assert to Reg.isVirtual()? so we can eventually get rid of the statics


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90725/new/

https://reviews.llvm.org/D90725



More information about the llvm-commits mailing list