diff options
author | Chris Lattner <sabre@nondot.org> | 2006-01-24 05:48:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-01-24 05:48:21 +0000 |
commit | f9a1e3aadcbc7239ec59ce37325542b6484358df (patch) | |
tree | 230f9cdcba49c7eca0c74380dbd98b784216e292 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 78c38a7bc7891b2714c6e79607be684e87709df9 (diff) | |
download | bcm5719-llvm-f9a1e3aadcbc7239ec59ce37325542b6484358df.tar.gz bcm5719-llvm-f9a1e3aadcbc7239ec59ce37325542b6484358df.zip |
Fix an infinite loop I caused by making sure to legalize the flag operand
of CALLSEQ_* nodes
llvm-svn: 25582
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index c1ba5ebc4ab..ed96bd61ae2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1276,6 +1276,19 @@ void SDNode::setAdjCallChain(SDOperand N) { OperandList[0].Val->Uses.push_back(this); } +// setAdjCallFlag - This method changes the flag input of an +// CALLSEQ_START/END node to be the specified operand. +void SDNode::setAdjCallFlag(SDOperand N) { + assert(N.getValueType() == MVT::Flag); + assert((getOpcode() == ISD::CALLSEQ_START || + getOpcode() == ISD::CALLSEQ_END) && "Cannot adjust this node!"); + + SDOperand &FlagOp = OperandList[getNumOperands()-1]; + assert(FlagOp.getValueType() == MVT::Flag); + FlagOp.Val->removeUser(this); + FlagOp = N; + FlagOp.Val->Uses.push_back(this); +} SDOperand SelectionDAG::getLoad(MVT::ValueType VT, |