mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-01 07:11:45 +00:00
After legalizing a DAG, delete dead nodes to save space.
llvm-svn: 19346
This commit is contained in:
parent
16faa6501a
commit
3871313761
@ -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