[llvm] 51ec5a2 - AMDGPU: Use available subtarget member
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 31 05:05:22 PDT 2023
Author: Matt Arsenault
Date: 2023-07-31T08:05:12-04:00
New Revision: 51ec5a27333e11e56811f1a936a9376e11889251
URL: https://github.com/llvm/llvm-project/commit/51ec5a27333e11e56811f1a936a9376e11889251
DIFF: https://github.com/llvm/llvm-project/commit/51ec5a27333e11e56811f1a936a9376e11889251.diff
LOG: AMDGPU: Use available subtarget member
Added:
Modified:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index b78aa9a45e5e54..7bc8a24cebcd03 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -3482,22 +3482,21 @@ SDValue SITargetLowering::lowerDYNAMIC_STACKALLOCImpl(
SDValue SP = DAG.getCopyFromReg(Chain, dl, SPReg, VT);
Chain = SP.getValue(1);
MaybeAlign Alignment = cast<ConstantSDNode>(Tmp3)->getMaybeAlignValue();
- const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
- const TargetFrameLowering *TFL = ST.getFrameLowering();
+ const TargetFrameLowering *TFL = Subtarget->getFrameLowering();
unsigned Opc =
TFL->getStackGrowthDirection() == TargetFrameLowering::StackGrowsUp ?
ISD::ADD : ISD::SUB;
SDValue ScaledSize = DAG.getNode(
ISD::SHL, dl, VT, Size,
- DAG.getConstant(ST.getWavefrontSizeLog2(), dl, MVT::i32));
+ DAG.getConstant(Subtarget->getWavefrontSizeLog2(), dl, MVT::i32));
Align StackAlign = TFL->getStackAlign();
Tmp1 = DAG.getNode(Opc, dl, VT, SP, ScaledSize); // Value
if (Alignment && *Alignment > StackAlign) {
Tmp1 = DAG.getNode(ISD::AND, dl, VT, Tmp1,
DAG.getConstant(-(uint64_t)Alignment->value()
- << ST.getWavefrontSizeLog2(),
+ << Subtarget->getWavefrontSizeLog2(),
dl, VT));
}
More information about the llvm-commits
mailing list