Skip to content

Commit f51cfd7

Browse files
committed
Commenting.
1 parent 61c18df commit f51cfd7

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8205,17 +8205,17 @@ SystemZTargetLowering::emitAdjCallStack(MachineInstr &MI,
82058205
auto *TFL = Subtarget.getFrameLowering<SystemZFrameLowering>();
82068206
assert(TFL->hasReservedCallFrame(MF) &&
82078207
"ADJSTACKDOWN and ADJSTACKUP should be no-ops");
8208-
// Do the work of MachineFrameInfo::computeMaxCallFrameSize() early and
8209-
// remove these nodes. Given that these nodes start out as a glued sequence
8210-
// it seems best to handle them here after instruction selection and
8211-
// scheduling.
8208+
// Get the MaxCallFrameSize value and clear the NumBytes value to not
8209+
// confuse the verifier. Keep them around as scheduling barriers around
8210+
// call arguments even though they serve no further purpose as the call
8211+
// frame is statically reserved in the prolog.
82128212
uint32_t NumBytes = MI.getOperand(0).getImm();
82138213
if (NumBytes > MFI.getMaxCallFrameSize())
82148214
MFI.setMaxCallFrameSize(NumBytes);
8215+
// Set AdjustsStack as this is *not* mapped as a frame instruction.
82158216
MFI.setAdjustsStack(true);
82168217

8217-
// TODO: MI should be erased. For now, keep it around as it seems to help
8218-
// eliminate COPYs around calls slightly in general (fix MachineScheduler?).
8218+
// TODO: Fix machine scheduler and erase MI instead?
82198219
MI.getOperand(0).setImm(0);
82208220

82218221
return BB;

llvm/lib/Target/SystemZ/SystemZInstrInfo.td

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ def IsTargetELF : Predicate<"Subtarget->isTargetELF()">;
1313
// Stack allocation
1414
//===----------------------------------------------------------------------===//
1515

16-
// These pseudos are removed after instruction selection while updating the
17-
// values of MaxcallFrameSize and AdjustsStack which are needed during frame
18-
// lowering. The callseq_start node requires the hasSideEffects flag.
16+
// These pseudos carry values needed to compute the MaxcallFrameSize of the
17+
// function. The callseq_start node requires the hasSideEffects flag.
1918
let usesCustomInserter = 1, hasNoSchedulingInfo = 1, hasSideEffects = 1 in {
2019
def ADJCALLSTACKDOWN : Pseudo<(outs), (ins i64imm:$amt1, i64imm:$amt2),
2120
[(callseq_start timm:$amt1, timm:$amt2)]>;

0 commit comments

Comments
 (0)