[PATCH] D85882: [AMDGPU] Update subtarget features for new target ID support
Tony Tye via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 30 13:39:32 PST 2020
t-tye added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h:303
+ Optional<AMDGPU::IsaInfo::AMDGPUTargetID> TargetID;
+
----------------
arsenm wrote:
> kerbowa wrote:
> > arsenm wrote:
> > > Don't see why this would be Optional if the query just crashes if it's missing
> > It's not constructed until "initializeSubtargetDependencies" is called.
> It can just use an invalid target ID value then
But optional is a better way of indicating an object does not yet have a value than imposing that the value itself has a distinguished NULL value.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85882/new/
https://reviews.llvm.org/D85882
More information about the llvm-commits
mailing list