[PATCH] D138199: [VE] Pass address space to TLI.getPointerTy()
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 17 04:00:32 PST 2022
arichardson created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
arichardson updated this revision to Diff 476083.
arichardson added a comment.
arichardson published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
rebase
Longer-term this will eventually allow removing the default 0 argument.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D138199
Files:
llvm/lib/Target/VE/VEISelLowering.cpp
Index: llvm/lib/Target/VE/VEISelLowering.cpp
===================================================================
--- llvm/lib/Target/VE/VEISelLowering.cpp
+++ llvm/lib/Target/VE/VEISelLowering.cpp
@@ -529,10 +529,12 @@
Offset += 4;
int FI = MF.getFrameInfo().CreateFixedObject(ValSize, Offset, true);
- InVals.push_back(
- DAG.getLoad(VA.getValVT(), DL, Chain,
- DAG.getFrameIndex(FI, getPointerTy(MF.getDataLayout())),
- MachinePointerInfo::getFixedStack(MF, FI)));
+ InVals.push_back(DAG.getLoad(
+ VA.getValVT(), DL, Chain,
+ DAG.getFrameIndex(
+ FI, getPointerTy(MF.getDataLayout(),
+ DAG.getDataLayout().getAllocaAddrSpace())),
+ MachinePointerInfo::getFixedStack(MF, FI)));
}
if (!IsVarArg)
@@ -583,7 +585,8 @@
SelectionDAG &DAG = CLI.DAG;
SDLoc DL = CLI.DL;
SDValue Chain = CLI.Chain;
- auto PtrVT = getPointerTy(DAG.getDataLayout());
+ auto PtrVT = getPointerTy(DAG.getDataLayout(),
+ DAG.getDataLayout().getProgramAddressSpace());
// VE target does not yet support tail call optimization.
CLI.IsTailCall = false;
@@ -1568,7 +1571,8 @@
SDValue VETargetLowering::lowerVASTART(SDValue Op, SelectionDAG &DAG) const {
MachineFunction &MF = DAG.getMachineFunction();
VEMachineFunctionInfo *FuncInfo = MF.getInfo<VEMachineFunctionInfo>();
- auto PtrVT = getPointerTy(DAG.getDataLayout());
+ auto PtrVT = getPointerTy(DAG.getDataLayout(),
+ DAG.getDataLayout().getAllocaAddrSpace());
// Need frame address to find the address of VarArgsFrameIndex.
MF.getFrameInfo().setFrameAddressIsTaken(true);
@@ -1728,7 +1732,8 @@
const VESubtarget *Subtarget) {
SDLoc DL(Op);
MachineFunction &MF = DAG.getMachineFunction();
- EVT PtrVT = TLI.getPointerTy(MF.getDataLayout());
+ EVT PtrVT = TLI.getPointerTy(MF.getDataLayout(),
+ DAG.getDataLayout().getAllocaAddrSpace());
MachineFrameInfo &MFI = MF.getFrameInfo();
MFI.setFrameAddressIsTaken(true);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138199.476083.patch
Type: text/x-patch
Size: 2138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221117/fe712162/attachment.bin>
More information about the llvm-commits
mailing list