[llvm] 6c770a0 - AMDGPU: Hoist subtarget lookup
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 07:38:17 PDT 2020
Author: Matt Arsenault
Date: 2020-08-27T10:27:56-04:00
New Revision: 6c770a09bed7cb955a7ecfa5c7b3111bdb772620
URL: https://github.com/llvm/llvm-project/commit/6c770a09bed7cb955a7ecfa5c7b3111bdb772620
DIFF: https://github.com/llvm/llvm-project/commit/6c770a09bed7cb955a7ecfa5c7b3111bdb772620.diff
LOG: AMDGPU: Hoist subtarget lookup
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
index 54c15e4e4d397..3ff1ada720bac 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
@@ -124,6 +124,7 @@ bool AMDGPULowerIntrinsics::makeLIDRangeMetadata(Function &F) const {
return false;
const TargetMachine &TM = TPC->getTM<TargetMachine>();
+ const AMDGPUSubtarget &ST = AMDGPUSubtarget::get(TM, F);
bool Changed = false;
for (auto *U : F.users()) {
@@ -131,7 +132,7 @@ bool AMDGPULowerIntrinsics::makeLIDRangeMetadata(Function &F) const {
if (!CI)
continue;
- Changed |= AMDGPUSubtarget::get(TM, F).makeLIDRangeMetadata(CI);
+ Changed |= ST.makeLIDRangeMetadata(CI);
}
return Changed;
}
More information about the llvm-commits
mailing list