[PATCH] D99812: [PowerPC] [GlobalISel] Implementation of formal arguments lowering in the IRTranslator for the PPC backend
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 11:11:38 PDT 2021
arsenm added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCCallLowering.cpp:85
+ return false;
+ MIRBuilder.setMBB(MBB);
+ return true;
----------------
Shouldn't need to change the block
================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCCallLowering.cpp:116
+ const LLT LocVT = LLT{VA.getLocVT()};
+ if (RegTy.getScalarSizeInBits() < LocVT.getScalarSizeInBits()) {
+ Size = 4;
----------------
I don't think this is necessary, you should be able to just directly load into ValVReg if CallLowering did its job correctly and the expected types are consistent
================
Comment at: llvm/lib/Target/PowerPC/GISel/PPCCallLowering.cpp:135
+ MachineInstrBuilder AddrReg;
+ if (MIRBuilder.getMF().getSubtarget<PPCSubtarget>().isPPC64())
+ AddrReg = MIRBuilder.buildFrameIndex(LLT::pointer(0, 64), FI);
----------------
Just swap the pointer type rather than conditionally calling buildFrameIndex? Also can just query the datalayout instead of going through the subtarget
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99812/new/
https://reviews.llvm.org/D99812
More information about the llvm-commits
mailing list