Add a new SelectionDAG::RemoveDeadNodes method

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-01-07 21:08:55 +00:00
parent 39931a3dba
commit d1fc96499b
2 changed files with 20 additions and 1 deletions

View File

@@ -409,6 +409,17 @@ protected:
void setValueTypes(std::vector<MVT::ValueType> &VTs) {
std::swap(Values, VTs);
}
void removeUser(SDNode *User) {
// Remove this user from the operand's use list.
for (unsigned i = Uses.size(); ; --i) {
assert(i != 0 && "Didn't find user!");
if (Uses[i-1] == User) {
Uses.erase(Uses.begin()+i-1);
break;
}
}
}
};
@@ -498,7 +509,6 @@ protected:
GlobalAddressSDNode(const GlobalValue *GA, MVT::ValueType VT)
: SDNode(ISD::GlobalAddress, VT) {
TheGlobal = const_cast<GlobalValue*>(GA);
}
public: