[llvm] [AMDGPU] Introduce a pseudo mnemonic for S_DELAY_ALU in MIR. (PR #96004)
Michael Bedy via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 20 06:24:21 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.
----------------
mjbedy wrote:
It's the same as the existing comment in the base class, although somehow I managed to introduce a mispelling in the process of copying it.
I agree it's not a great comment. I'll fix this version to more clear.
https://github.com/llvm/llvm-project/pull/96004
More information about the llvm-commits
mailing list