[PATCH] D76135: [MachineLICM] Don't treat cross copies as cheap

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 13 09:39:48 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineLICM.cpp:1157-1187
+static bool isCrossCopy(const MachineInstr &MI) {
+  if (!MI.isCopy())
+    return false;
+  const MachineRegisterInfo &MRI = MI.getMF()->getRegInfo();
+
+  Register DstReg = MI.getOperand(0).getReg();
+  unsigned DstSubIdx = MI.getOperand(0).getSubReg();
----------------
This looks pretty much identical to TargetRegisterInfo::shouldRewriteCopySrc/shareSameRegisterFile


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

https://reviews.llvm.org/D76135





More information about the llvm-commits mailing list