From ce3d93e4be0aa7d30360ad863456b031a1e72916 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 3 Mar 2023 18:50:34 -0400 Subject: [PATCH] AMDGPU: Use static constexpr instead of static const Not sure why this was broken, but I was seeing this linker error: ld64.lld: error: undefined symbol: (anonymous namespace)::AMDGPUInsertDelayAlu::DelayInfo::SALU_CYCLES_MAX >>> referenced by AMDGPUInsertDelayAlu.cpp:129 (/Users/matt/src/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp:129) --- llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp index b7e23fa..57d0fda 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUInsertDelayAlu.cpp @@ -77,15 +77,15 @@ public: struct DelayInfo { // One larger than the maximum number of (non-TRANS) VALU instructions we // can encode in an s_delay_alu instruction. - static const unsigned VALU_MAX = 5; + static constexpr unsigned VALU_MAX = 5; // One larger than the maximum number of TRANS instructions we can encode in // an s_delay_alu instruction. - static const unsigned TRANS_MAX = 4; + static constexpr unsigned TRANS_MAX = 4; // The maximum number of SALU cycles we can encode in an s_delay_alu // instruction. - static const unsigned SALU_CYCLES_MAX = 3; + static constexpr unsigned SALU_CYCLES_MAX = 3; // If it was written by a (non-TRANS) VALU, remember how many clock cycles // are left until it completes, and how many other (non-TRANS) VALU we have -- 2.7.4