[clang] [llvm] [NVPTX] Consolidate and cleanup various NVPTXISD nodes (NFC) (PR #145581)
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 25 11:20:16 PDT 2025
================
@@ -457,3 +457,25 @@ void NVPTXInstPrinter::printCTAGroup(const MCInst *MI, int OpNum,
}
llvm_unreachable("Invalid cta_group in printCTAGroup");
}
+
+void NVPTXInstPrinter::printCallOperand(const MCInst *MI, int OpNum,
+ raw_ostream &O, StringRef Modifier) {
+ const MCOperand &MO = MI->getOperand(OpNum);
+ assert(MO.isImm() && "Invalid operand");
+ const auto Imm = MO.getImm();
+
+ if (Modifier == "RetList") {
+ assert((Imm == 1 || Imm == 0) && "Invalid return list");
+ if (Imm)
+ O << " (retval0),";
+ return;
+ }
+
+ if (Modifier == "ParamList") {
+ assert(Imm >= 0 && "Invalid parameter list");
+ interleaveComma(llvm::seq(Imm), O,
+ [&](const auto &I) { O << "param" << I; });
+ return;
+ }
----------------
Artem-B wrote:
Let's keep it as is. JIT-produced PTX is rarely read by anyone other than ptxas. For human use current form is fine.
https://github.com/llvm/llvm-project/pull/145581
More information about the cfe-commits
mailing list