diff options
author | Dan Gohman <gohman@apple.com> | 2011-01-14 22:26:16 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2011-01-14 22:26:16 +0000 |
commit | ca5f61676956cff088c225c3c166a589410b3101 (patch) | |
tree | aa4baa2413f9cba7d4f9cf3ba1c69e5c84baf03d /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | cff6b3772bd991119ff4882e06af29fbdb60e93f (diff) | |
download | external_llvm-ca5f61676956cff088c225c3c166a589410b3101.zip external_llvm-ca5f61676956cff088c225c3c166a589410b3101.tar.gz external_llvm-ca5f61676956cff088c225c3c166a589410b3101.tar.bz2 |
Delete an assignment to ThisBB which isn't needed, and tidy up some
comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123479 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 6a999c2..f5f267c 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1135,7 +1135,7 @@ SelectionDAGISel::FinishBasicBlock() { // additional DAGs necessary. for (unsigned i = 0, e = SDB->SwitchCases.size(); i != e; ++i) { // Set the current basic block to the mbb we wish to insert the code into - MachineBasicBlock *ThisBB = FuncInfo->MBB = SDB->SwitchCases[i].ThisBB; + FuncInfo->MBB = SDB->SwitchCases[i].ThisBB; FuncInfo->InsertPt = FuncInfo->MBB->end(); // Determine the unique successors. @@ -1144,13 +1144,15 @@ SelectionDAGISel::FinishBasicBlock() { if (SDB->SwitchCases[i].TrueBB != SDB->SwitchCases[i].FalseBB) Succs.push_back(SDB->SwitchCases[i].FalseBB); - // Emit the code. Note that this could result in ThisBB being split, so - // we need to check for updates. + // Emit the code. Note that this could result in FuncInfo->MBB being split. SDB->visitSwitchCase(SDB->SwitchCases[i], FuncInfo->MBB); CurDAG->setRoot(SDB->getRoot()); SDB->clear(); CodeGenAndEmitDAG(); - ThisBB = FuncInfo->MBB; + + // Remember the last block, now that any splitting is done, for use in + // populating PHI nodes in successors. + MachineBasicBlock *ThisBB = FuncInfo->MBB; // Handle any PHI nodes in successors of this chunk, as if we were coming // from the original BB before switch expansion. Note that PHI nodes can |