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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 06:08:58 PDT 2022


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/RegAllocFast.cpp:306
+  assert(Register::isVirtualRegister(Reg));
+  const TargetRegisterClass &RC = *MRI->getRegClass(Reg);
+  return ShouldAllocateClass(*TRI, RC);
----------------
LuoYuanke wrote:
> arsenm wrote:
> > LuoYuanke wrote:
> > > I'll use getRegClassOrNull() to replace getRegClass().
> > No, getRegClass should be used here. Virtual registers must have a class at this point
> In goable instruction selection is it possible there is no register class for a virtual register?
Classes should have been set as part of the selection process


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