[PATCH] D61948: Implement call lowering without parameters on AIX
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 22 20:19:20 PDT 2019
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCFrameLowering.cpp:74
static unsigned computeLinkageSize(const PPCSubtarget &STI) {
- if (STI.isDarwinABI() || STI.isPPC64())
+ if (STI.isDarwinABI() || STI.isPPC64() || STI.isAIXABI())
return (STI.isELFv2ABI() ? 4 : 6) * (STI.isPPC64() ? 8 : 4);
----------------
Minor nit: We should group checks of "similar" properties together. So, AIX and Darwin together.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5157
// Add a NOP immediately after the branch instruction when using the 64-bit
- // SVR4 ABI. At link time, if caller and callee are in a different module and
+ // SVR4 ABI, or AIX ABI.
+ // At link time, if caller and callee are in a different module and
----------------
Minor: No comma for lists of less than three items.
Suggestion:
> SVR4 or AIX ABIs.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5164
// stack frame. If caller and callee belong to the same module (and have the
// same TOC), the NOP will remain unchanged.
----------------
The NOP may change to become some other NOP.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:5167
MachineFunction &MF = DAG.getMachineFunction();
- if (!isTailCall && Subtarget.isSVR4ABI()&& Subtarget.isPPC64() &&
- !isPatchPoint) {
+ if (!isTailCall &&!isPatchPoint &&
+ ((Subtarget.isSVR4ABI() && Subtarget.isPPC64()) ||
----------------
Minor nit: Missing space before `!isPatchPoint`.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.h:1120
+ SDValue LowerCall_AIX(SDValue Chain, SDValue Callee,
+ CallingConv::ID CallConv, bool isVarArg,
+ bool isTailCall, bool isPatchPoint,
----------------
Minor nit: Indentation needs adjustment.
================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:1460
+ def BL_NOP : IForm_and_DForm_4_zero<18, 0, 1, 24,
+ (outs), (ins calltarget:$func),
+ "bl $func\n\tnop", IIC_BrB, []>;
----------------
Minor nit: Other blocks align to after the `<`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61948/new/
https://reviews.llvm.org/D61948
More information about the llvm-commits
mailing list