Reorgnaize more switch code lowering to clean up some tricky

code, and to eliminate the need for the SelectionDAGBuilder
state to be live during CodeGenAndEmitDAG calls.

Call SDB->clear() before CodeGenAndEmitDAG calls instead of
before it, and move the CurDAG->clear() out of SelectionDAGBuilder,
which doesn't own the DAG, and into CodeGenAndEmitDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102814 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-05-01 00:25:44 +00:00
parent 3f755d7ec6
commit 95140a4cc1
2 changed files with 22 additions and 22 deletions

View File

@ -545,7 +545,6 @@ void SelectionDAGBuilder::clear() {
NodeMap.clear();
PendingLoads.clear();
PendingExports.clear();
DAG.clear();
CurDebugLoc = DebugLoc();
HasTailCall = false;
}