[AMDGPU] Use isMetaInstruction for instruction size

Meta instructions have a size of 0. Use isMetaInstruction instead of
listing them explicitly.

Differential Revision: https://reviews.llvm.org/D106043
This commit is contained in:
Sebastian Neubauer 2021-07-15 10:21:33 +02:00
parent 9bf2e7eeeb
commit afd895709d
1 changed files with 2 additions and 5 deletions

View File

@ -7196,11 +7196,6 @@ unsigned SIInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
}
switch (Opc) {
case TargetOpcode::IMPLICIT_DEF:
case TargetOpcode::KILL:
case TargetOpcode::DBG_VALUE:
case TargetOpcode::EH_LABEL:
return 0;
case TargetOpcode::BUNDLE:
return getInstBundleSize(MI);
case TargetOpcode::INLINEASM:
@ -7210,6 +7205,8 @@ unsigned SIInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
return getInlineAsmLength(AsmStr, *MF->getTarget().getMCAsmInfo(), &ST);
}
default:
if (MI.isMetaInstruction())
return 0;
return DescSize;
}
}