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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57040 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2008-10-04 00:56:36 +00:00
parent 022b21ff7c
commit 241f464d24
2 changed files with 13 additions and 2 deletions

View File

@@ -55,12 +55,20 @@ protected:
const TargetLowering &TLI;
public:
/// startNewBlock - Set the current block, to which generated
/// machine instructions will be appended, and clear the local
/// CSE map.
///
void startNewBlock(MachineBasicBlock *mbb) {
setCurrentBlock(mbb);
LocalValueMap.clear();
}
/// setCurrentBlock - Set the current block, to which generated
/// machine instructions will be appended.
///
void setCurrentBlock(MachineBasicBlock *mbb) {
MBB = mbb;
LocalValueMap.clear();
}
/// SelectInstruction - Do "fast" instruction selection for the given