[PATCH] D155881: [AMDGPU] Remove std::optional from VOPD::ComponentProps. NFC.
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 12:49:11 PDT 2023
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h:575-576
private:
unsigned SrcOperandsNum = 0;
- std::optional<unsigned> MandatoryLiteralIdx;
+ unsigned MandatoryLiteralIdx = ~0u;
bool HasSrc2Acc = false;
----------------
arsenm wrote:
> Can these be uint8_t (or even a packed uint8_t?)
We are not really saving space here, and I will have to add more fields later. But then:
SrcOperandsNum - 2 bits
MandatoryLiteralIdx - 4 bits
HasSrc2Acc - 1 bit
I.e. 7 bits total.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155881/new/
https://reviews.llvm.org/D155881
More information about the llvm-commits
mailing list