[PATCH] D11696: [x86] machine combiner reassociation: mark EFLAGS operand as 'dead'

Sanjay Patel spatel at rotateright.com
Tue Aug 4 07:41:09 PDT 2015


spatel marked 2 inline comments as done.

================
Comment at: lib/Target/X86/X86InstrInfo.cpp:6443
@@ +6442,3 @@
+/// reassociated.
+static void setExtraReassOperands(MachineInstr &OldMI1, MachineInstr &OldMI2,
+                                  MachineInstr &NewMI1, MachineInstr &NewMI2) {
----------------
Gerolf wrote:
> Would setSpecialOperandAttributes() be a better name?
Yes, that's a better name. Thanks!

================
Comment at: lib/Target/X86/X86InstrInfo.cpp:6450
@@ +6449,3 @@
+
+  assert(NewMI1.getNumOperands() == 4 && NewMI2.getNumOperands() == 4 &&
+         "Unexpected instruction type for reassociation");
----------------
Gerolf wrote:
> Looks a bit of an overkill here.
Agree - it's assert-heavy. But I wanted to be extra safe for when some of the code gets hoisted up to the machine combiner. It may not be so obvious what the architecture-specific assumptions are at that point. I'll leave this in for now, and if it feels unnecessary later, we can get rid of it.


http://reviews.llvm.org/D11696







More information about the llvm-commits mailing list