[PATCH] D152828: [MachineSink][AArch64] Sink instruction copies when they can replace copy into hard register or folded into addressing mode

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 09:51:47 PDT 2023


labrinea added a comment.

A few nitpicks.



================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:1441
 
+  /// Check if it's posisble and beneficial to fold the addressing computation
+  /// `AddrI` into the addressing mode of the load/store instruction `MemI`. The
----------------
typo


================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:1455
+  /// using the address from `AM`. The addressing mode must have been obtained
+  /// from `canFoldIntoAddr` for the samem memory instruction.
+  virtual MachineInstr *emitLdStWithAddr(MachineInstr &MemI,
----------------
typo


================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:443
+
+        // Check we don't exceed register presure at the destination.
+        const MachineBasicBlock &MBB = *UseInst.getParent();
----------------
pressure


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:2711
+
+// Check the fold operand is not the loaded/stored value.
+  const MachineOperand &BaseRegOp = MemI.getOperand(0);
----------------
indentation


================
Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.cpp:3039
+
+// The new insrtruction will be in the form `ld[u]r Rt, [Xn, #imm]`.
+  unsigned Scale = 1;
----------------
indentation


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152828/new/

https://reviews.llvm.org/D152828



More information about the llvm-commits mailing list