Factor out and unify some common code that calculates and tracks the
number of user SGRPs.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/GCNSubtarget.h | ||
---|---|---|
1412 | gcc 8.5.0 doesn't like this being constexpr due to the call to unreachable. I'm getting an error like llvm/lib/Target/AMDGPU/GCNSubtarget.h: In static member function ‘static constexpr unsigned int llvm::GCNUserSGPRUsageInfo::getNumUserSGPRForField(llvm::GCNUserSGPRUsageInfo::UserSGPRID)’: llvm/include/llvm/Support/ErrorHandling.h:144:36: error: call to non-‘constexpr’ function ‘void llvm::llvm_unreachable_internal(const char*, const char*, unsigned int)’ ::llvm::llvm_unreachable_internal(msg, __FILE__, __LINE__) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ llvm/lib/Target/AMDGPU/GCNSubtarget.h:1431: note: in expansion of macro llvm_unreachable’ llvm_unreachable("Unknown UserSGPRID."); |
gcc 8.5.0 doesn't like this being constexpr due to the call to unreachable. I'm getting an error like