[llvm] AMDGPU: Stop copying triple into AMDGPUSubtarget (PR #184147)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 2 06:56:37 PST 2026
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/184147
Really the triple doesn't belong here at all.
>From 86a721f8577a236e809675d3b4bdb8a8022d445e Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Mon, 2 Mar 2026 15:20:58 +0100
Subject: [PATCH] AMDGPU: Stop copying triple into AMDGPUSubtarget
Really the triple doesn't belong here at all.
---
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
index 302fe7c850b75..4e1e54da5f4a9 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -46,7 +46,7 @@ class AMDGPUSubtarget {
};
private:
- Triple TargetTriple;
+ const Triple &TargetTriple;
protected:
bool HasMulI24 = true;
@@ -61,7 +61,7 @@ class AMDGPUSubtarget {
char WavefrontSizeLog2 = 0;
public:
- AMDGPUSubtarget(Triple TT) : TargetTriple(std::move(TT)) {}
+ AMDGPUSubtarget(const Triple &TT) : TargetTriple(TT) {}
static const AMDGPUSubtarget &get(const MachineFunction &MF);
static const AMDGPUSubtarget &get(const TargetMachine &TM,
More information about the llvm-commits
mailing list