[llvm] [SPIR-V][Codegen] Add isPhi bit to MCInstrDesc/MIR definitions (PR #110019)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 09:16:07 PDT 2024


Keenuts wrote:

So, looks like fixing `isPHI()` to read from the `TargetInstrInfo` requires touching to all the backends so far. Some parts already have TII, so easy fix, other don't and require more of less changes to get TII.
Getting the TII from the `MachineInstr` parents is almost good, except if you remove an instruction from a BB, then you don't have this context, and `isPHI` cannot work.

@arsenm : would it be OK to add pointer to TII in `MachineInstr`? This way, we could keep the `isPHI` in `MachineInstr`, and add the iterators for it: `incoming_phi_operands_begin()`


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


More information about the llvm-commits mailing list