[llvm] [AMDGPU] Introduce a pseudo mnemonic for S_DELAY_ALU in MIR. (PR #96004)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 01:35:34 PDT 2024


================
@@ -17,6 +17,157 @@
 
 using namespace llvm;
 
+void AMDGPUMIRFormatter::printImm(raw_ostream &OS, const MachineInstr &MI,
+                      std::optional<unsigned int> OpIdx, int64_t Imm) const {
+
+  switch(MI.getOpcode()) {
+  case AMDGPU::S_DELAY_ALU:
+    assert(OpIdx == 0);
+    printSDelayAluImm(Imm, OS);
+    break;
+  default:
+    MIRFormatter::printImm(OS, MI, OpIdx, Imm);
+    break;
+  }
+}
+
+/// Implement target specific parsing of immediate mnemonics. The mnemonic is
+/// dot seperated strings.
----------------
jayfoad wrote:

"Separated" here and elsewhere.

Also not sure what you mean by dot-separated. It looks more like an identifier with a leading dot.


https://github.com/llvm/llvm-project/pull/96004


More information about the llvm-commits mailing list