[PATCH] D29452: AMDGPU/SI: DAGMutation for removing deps between CSEs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 09:46:02 PST 2017

arsenm added inline comments.

Comment at: lib/Target/AMDGPU/GCNSchedStrategy.cpp:334-338
+  // Only CSE instruction with immediate uses.
+  for (const MachineOperand &MO : MI.uses()) {
+    if (!MO.isImm())
+    return false;
+  }
This is broader than the move immediate case. There need to be some tests where this happens for other instruction types

Comment at: lib/Target/AMDGPU/GCNSchedStrategy.cpp:341-344
+  for (const MachineOperand &MO : MI.defs()) {
+    if (!TargetRegisterInfo::isPhysicalRegister(MO.getReg()))
+      return false;
+  }
I think trying to handle multiple defs will be hazardous


More information about the llvm-commits mailing list