[all-commits] [llvm/llvm-project] 742507: [AMDGPU] Add & use `hasNamedOperand`, NFC
Pierre van Houtryve via All-commits
all-commits at lists.llvm.org
Mon Nov 7 23:57:36 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7425077e31c9b505103a98299a728bc496bd933c
https://github.com/llvm/llvm-project/commit/7425077e31c9b505103a98299a728bc496bd933c
Author: Pierre van Houtryve <pierre.vanhoutryve at amd.com>
Date: 2022-11-08 (Tue, 08 Nov 2022)
Changed paths:
M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
M llvm/lib/Target/AMDGPU/GCNDPPCombine.cpp
M llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
M llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp
M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
M llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
M llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
Log Message:
-----------
[AMDGPU] Add & use `hasNamedOperand`, NFC
In a lot of places, we were just calling `getNamedOperandIdx` to check if the result was != or == to -1.
This is fine in itself, but it's verbose and doesn't make the intention clear, IMHO. I added a `hasNamedOperand` and replaced all cases I could find with regexes and manually.
Reviewed By: arsenm, foad
Differential Revision: https://reviews.llvm.org/D137540
More information about the All-commits
mailing list