[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Jan 17 14:56:24 PST 2005
Changes in directory llvm/lib/Target/X86:
X86ISelPattern.cpp updated: 1.65 -> 1.66
---
Log message:
Do not give token factor nodes outrageous weights
---
Diffs of the changes: (+5 -2)
Index: llvm/lib/Target/X86/X86ISelPattern.cpp
diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.65 llvm/lib/Target/X86/X86ISelPattern.cpp:1.66
--- llvm/lib/Target/X86/X86ISelPattern.cpp:1.65 Mon Jan 17 16:10:42 2005
+++ llvm/lib/Target/X86/X86ISelPattern.cpp Mon Jan 17 16:56:09 2005
@@ -453,8 +453,11 @@
++NumExtraMaxRegUsers;
}
}
-
- Result = MaxRegUse+NumExtraMaxRegUsers;
+
+ if (O.getOpcode() != ISD::TokenFactor)
+ Result = MaxRegUse+NumExtraMaxRegUsers;
+ else
+ Result = std::max(MaxRegUse-1, 1);
}
//std::cerr << " WEIGHT: " << Result << " "; N->dump(); std::cerr << "\n";
More information about the llvm-commits
mailing list