summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-04 00:56:36 +0000
committerDan Gohman <gohman@apple.com>2008-10-04 00:56:36 +0000
commit13b048268b44f6cd9b87865c6e2636d49645b0e3 (patch)
tree31f133b17335e1aae62bc08e72a1839d29c20cb2 /llvm/lib/CodeGen/SelectionDAG
parent78bb44fcd4581f5b07d8e903ea81d4632e60a793 (diff)
downloadbcm5719-llvm-13b048268b44f6cd9b87865c6e2636d49645b0e3.tar.gz
bcm5719-llvm-13b048268b44f6cd9b87865c6e2636d49645b0e3.zip
Fix fast-isel's handling of atomic instructions. They may
expand to multiple basic blocks, in which case fast-isel needs to informed of which block to use as it resumes inserting instructions. llvm-svn: 57040
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index f2f14490b16..dce46ab414b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -756,7 +756,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF,
CodeGenAndEmitDAG();
SDL->clear();
}
- FastIS->setCurrentBlock(BB);
+ FastIS->startNewBlock(BB);
// Do FastISel on as many instructions as possible.
for (; BI != End; ++BI) {
// Just before the terminator instruction, insert instructions to
@@ -794,6 +794,9 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF,
}
SelectBasicBlock(LLVMBB, BI, next(BI));
+ // If the instruction was codegen'd with multiple blocks,
+ // inform the FastISel object where to resume inserting.
+ FastIS->setCurrentBlock(BB);
continue;
}
OpenPOWER on IntegriCloud