forked from OSchip/llvm-project
[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:
parent
9bf2e7eeeb
commit
afd895709d
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue