mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
After legalizing a DAG, delete dead nodes to save space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19346 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0e12e6e041
commit
62fd269c14
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user