After legalizing a DAG, delete dead nodes to save space.

llvm-svn: 19346
This commit is contained in:
Chris Lattner 2005-01-07 21:09:37 +00:00
parent 9c667933c1
commit 473825ccec
1 changed files with 1 additions and 6 deletions

View File

@ -167,7 +167,6 @@ SelectionDAGLegalize::SelectionDAGLegalize(TargetLowering &tli,
setValueTypeAction(MVT::f32, Promote);
}
void SelectionDAGLegalize::LegalizeDAG() {
SDOperand OldRoot = DAG.getRoot();
SDOperand NewRoot = LegalizeOp(OldRoot);
@ -177,11 +176,7 @@ void SelectionDAGLegalize::LegalizeDAG() {
LegalizedNodes.clear();
// Remove dead nodes now.
if (OldRoot != NewRoot)
// Delete all of these efficiently first.
;
// Then scan AllNodes.
DAG.RemoveDeadNodes(OldRoot.Val);
}
SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {