[PATCH] D126771: [fastalloc] Support allocate specific register class in fastalloc.

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 19 23:20:43 PDT 2022


LuoYuanke added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocFast.cpp:1304
         continue;
+      if (Reg.isVirtual() && !ShouldAllocateRegister(Reg))
+        continue;
----------------
xiangzhangllvm wrote:
> I think here should remove the check of "!ShouldAllocateRegister"
It seems keeping !ShouldAllocateRegister(Reg) can catch the unexpected bug by line 1404 where tile register has been allocated to tile physical register but it is still virtual register. I can add an additional assert here.


================
Comment at: llvm/lib/CodeGen/RegAllocFast.cpp:1402
         continue;
+      if (Reg.isVirtual() && !ShouldAllocateRegister(Reg))
+        continue;
----------------
xiangzhangllvm wrote:
> I think here should remove the check of "!ShouldAllocateRegister"
It seems keeping `!ShouldAllocateRegister(Reg)` can catch the unexpected bug by line 1404 where tile register has been allocated to tile physical register but it is still virtual register. I can add an additional assert here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126771



More information about the llvm-commits mailing list