[llvm] [TableGen][GISel] Create untyped registers during instruction selection (PR #121270)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 05:33:38 PST 2025
================
@@ -1485,15 +1485,28 @@ bool GIMatchTableExecutor::executeMatchTable(
propagateFlags();
return true;
}
- case GIR_MakeTempReg: {
+ case GIR_MakeGenericTempReg: {
uint64_t TempRegID = readULEB();
int TypeID = readS8();
State.TempRegisters[TempRegID] =
MRI.createGenericVirtualRegister(getTypeFromIdx(TypeID));
- DEBUG_WITH_TYPE(TgtExecutor::getName(),
- dbgs() << CurrentIdx << ": TempRegs[" << TempRegID
- << "] = GIR_MakeTempReg(" << TypeID << ")\n");
+ DEBUG_WITH_TYPE(TgtExecutor::getName(), {
+ dbgs() << CurrentIdx << ": TempRegs[" << TempRegID
+ << "] = GIR_MakeGenericTempReg(" << TypeID << ")\n";
+ });
+ break;
+ }
+ case GIR_MakeVirtualTempReg: {
+ uint64_t TempRegID = readULEB();
+
+ Register Reg = MRI.createIncompleteVirtualRegister();
----------------
s-barannikov wrote:
> I guess we could handle that in the selector implementation without having tablegen figure that out, not sure if having tablegen figure that out would be better
I don't see how ithis is better than creating an incomplete virtual register and let the selector implementation figure out the class?
https://github.com/llvm/llvm-project/pull/121270
More information about the llvm-commits
mailing list