[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Jim Laskey
jlaskey at apple.com
Tue Sep 26 10:45:13 PDT 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
DAGCombiner.cpp updated: 1.203 -> 1.204
---
Log message:
Load chain check is not needed
---
Diffs of the changes: (+1 -24)
DAGCombiner.cpp | 25 +------------------------
1 files changed, 1 insertion(+), 24 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.203 llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.204
--- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:1.203 Tue Sep 26 04:32:41 2006
+++ llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Sep 26 12:44:58 2006
@@ -240,10 +240,6 @@
SDOperand BuildUDIV(SDNode *N);
SDNode *MatchRotate(SDOperand LHS, SDOperand RHS);
- /// hasChainUsers - Returns true if one of the users of a load node has the
- /// chain result as an operand.
- bool hasChainUsers(SDNode *Load);
-
/// FindBaseOffset - Return true if we can determine base and offset
/// information from a given pointer operand. Provides base and offset as a
/// result.
@@ -2646,7 +2642,7 @@
// We can only move the load if it has a user of it's chain result. Otherwise
// there is no place to attach it's old chain.
- if (CombinerAA && hasChainUsers(N)) {
+ if (CombinerAA) {
// Walk up chain skipping non-aliasing memory nodes.
SDOperand BetterChain = FindBetterChain(N, Chain);
@@ -3953,25 +3949,6 @@
return S;
}
-/// hasChainUsers - Returns true if one of the users of a load node has the
-/// chain result as an operand.
-bool DAGCombiner::hasChainUsers(SDNode *Load) {
- SDOperand Chain(Load, 1); // The load's chain result.
-
- // For each user of the load.
- for (SDNode::use_iterator UI = Load->use_begin(), UE = Load->use_end();
- UI != UE; ++UI) {
- const SDNode *User = *UI;
-
- for (unsigned i = 0, e = User->getNumOperands(); i != e; ++i) {
- if (User->getOperand(i) == Chain) return true;
- }
- }
-
- // No luck.
- return false;
-}
-
/// FindBaseOffset - Return true if we can determine base and offset information
/// from a given pointer operand. Provides base and offset as a result.
bool DAGCombiner::FindBaseOffset(SDOperand Ptr,
More information about the llvm-commits
mailing list