aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-09-26 17:44:58 +0000
committerJim Laskey <jlaskey@mac.com>2006-09-26 17:44:58 +0000
commitbb1518585b2f2b2f501f70cc45c49a2d2ea57804 (patch)
treef96f3add19ca3240ecb6879f647d4c711acd1170 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent79597d2af6e1bd80a7768eab3b380d3d71469f5d (diff)
Load chain check is not needed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 32a81a044d..1fe1001967 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -240,10 +240,6 @@ class VISIBILITY_HIDDEN DAGCombiner {
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 @@ SDOperand DAGCombiner::visitLOAD(SDNode *N) {
// 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 @@ SDOperand DAGCombiner::BuildUDIV(SDNode *N) {
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,