[PATCH] D106043: [AMDGPU] Use isMetaInstruction for instruction size
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 15 01:22:53 PDT 2021
sebastian-ne created this revision.
sebastian-ne added reviewers: arsenm, foad.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
sebastian-ne requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Meta instructions have a size of 0. Use isMetaInstruction instead of
listing them explicitely.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106043
Files:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Index: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -7189,12 +7189,10 @@
return 8 + 4 * ((RSrcIdx - VAddr0Idx + 2) / 4);
}
- switch (Opc) {
- case TargetOpcode::IMPLICIT_DEF:
- case TargetOpcode::KILL:
- case TargetOpcode::DBG_VALUE:
- case TargetOpcode::EH_LABEL:
+ if (MI.isMetaInstruction())
return 0;
+
+ switch (Opc) {
case TargetOpcode::BUNDLE:
return getInstBundleSize(MI);
case TargetOpcode::INLINEASM:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106043.358863.patch
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210715/5bcbb2ee/attachment.bin>
More information about the llvm-commits
mailing list