Reorgnaize more switch code lowering to clean up some tricky
authorDan Gohman <gohman@apple.com>
Sat, 1 May 2010 00:25:44 +0000 (00:25 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 1 May 2010 00:25:44 +0000 (00:25 +0000)
commit95140a4cc168bb75a54a434e3e53f9060742dc41
tree15e51e01f10ae03bcc2b8592850330e04d426a98
parent3f755d7ec609f2428a2d0f2503003cea19b48d71
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
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp