When working with the scheduler in regards to SystemZ WriteLatencys, I came across cases where the mapping from SchedWrite entry to MI def operands (mapped by the ordering) were corrupted by implicit def operands added by regalloc. The specific register was "CC", which is an implicitly defined register part of the MCInstrDesc.
Since regalloc will not put its implicit-def operands last in list, I believe the right fix is to ignore those when carefully looking up the def index in findDefIdx.
If approved, I will hopefully commit this soon with SystemZ SchedModel improvements.
"We need to skip..." looks strange to me.
I would prefer if an implicit operand means the same thing regardless of whether it's in the Tablegen file or not.
Maybe it's the adding of the implicit operand that you need to inhibit in your case?