[llvm] 4a6d13b - Remove unused variable to fix '[AMDGPU] modify named barrier builtins and intrinsics (#114550)'
Thurston Dang via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 12:50:02 PST 2024
Author: Thurston Dang
Date: 2024-11-06T20:49:39Z
New Revision: 4a6d13bf4db63f4cd845d38128c79c17bbf8d99c
URL: https://github.com/llvm/llvm-project/commit/4a6d13bf4db63f4cd845d38128c79c17bbf8d99c
DIFF: https://github.com/llvm/llvm-project/commit/4a6d13bf4db63f4cd845d38128c79c17bbf8d99c.diff
LOG: Remove unused variable to fix '[AMDGPU] modify named barrier builtins and intrinsics (#114550)'
https://github.com/llvm/llvm-project/pull/114550 caused a buildbot breakage (https://lab.llvm.org/buildbot/#/builders/66/builds/5853) because of an unused variable. This patch attempts to fix forward:
/home/b/sanitizer-x86_64-linux/build/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp:106:24: error: variable 'TTy' set but not used [-Werror,-Wunused-but-set-variable]
106 | if (TargetExtType *TTy = AMDGPU::isNamedBarrier(GV)) {
| ^
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
index f52476464e05e6..ac11b11ef97ae5 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp
@@ -103,7 +103,7 @@ unsigned AMDGPUMachineFunction::allocateLDSGlobal(const DataLayout &DL,
unsigned Offset;
if (GV.getAddressSpace() == AMDGPUAS::LOCAL_ADDRESS) {
- if (TargetExtType *TTy = AMDGPU::isNamedBarrier(GV)) {
+ if (AMDGPU::isNamedBarrier(GV)) {
std::optional<unsigned> BarAddr = getLDSAbsoluteAddress(GV);
if (!BarAddr)
llvm_unreachable("named barrier should have an assigned address");
More information about the llvm-commits
mailing list