mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Speed up folding operations into loads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19733 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0442fbfadb
commit
fb0f53f9c1
@ -504,7 +504,8 @@ static bool NodeTransitivelyUsesValue(SDOperand N, SDOperand Op,
|
||||
std::set<SDNode*> &Visited) {
|
||||
if (N == Op) return true; // Found it.
|
||||
SDNode *Node = N.Val;
|
||||
if (Node->getNumOperands() == 0) return false; // Leaf?
|
||||
if (Node->getNumOperands() == 0 || // Leaf?
|
||||
Node->getNodeDepth() <= Op.getNodeDepth()) return false; // Can't find it?
|
||||
if (!Visited.insert(Node).second) return false; // Already visited?
|
||||
|
||||
// Recurse for the first N-1 operands.
|
||||
|
Loading…
x
Reference in New Issue
Block a user