[PATCH] [x86] generalize reassociation optimization in machine combiner to 2 instructions
Gerolf Hoflehner
ghoflehner at apple.com
Mon Jun 15 21:24:12 PDT 2015
================
Comment at: lib/CodeGen/MachineCombiner.cpp:214
@@ +213,3 @@
+/// and the new sequence has less instructions or the new sequence improves the
+/// critical path outright.
+/// The DAGCombine code sequence ends in MI (Machine Instruction) Root.
----------------
remove outright
================
Comment at: lib/CodeGen/MachineCombiner.cpp:218
@@ -216,1 +217,3 @@
+/// sequence to replace the old sequence is that it cannot lengthen the critical
+/// path. This is decided by the formula:
/// (NewRootDepth + NewRootLatency) <= (RootDepth + RootLatency + RootSlack)).
----------------
This is no longer true. The equation could now be '<'.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:6292
@@ -6300,3 +6291,3 @@
bool X86InstrInfo::hasPattern(MachineInstr &Root,
SmallVectorImpl<MachineCombinerPattern::MC_PATTERN> &Pattern) const {
----------------
This function does more than the name suggests. Also, I don't find it intuitive that is records two pattern.
http://reviews.llvm.org/D10460
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list