aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-08-22 20:51:05 +0000
committerBill Wendling <isanbard@gmail.com>2008-08-22 20:51:05 +0000
commitce1c5c11e59f565a2fcb5e53b407233c999884f1 (patch)
treea80ccea057402e75cf99deac3f9ed5c6029653e1 /lib/CodeGen/SelectionDAG/FastISel.cpp
parentfe91948efff85cf0d5fbc60c9434c652694e4f50 (diff)
downloadexternal_llvm-ce1c5c11e59f565a2fcb5e53b407233c999884f1.zip
external_llvm-ce1c5c11e59f565a2fcb5e53b407233c999884f1.tar.gz
external_llvm-ce1c5c11e59f565a2fcb5e53b407233c999884f1.tar.bz2
Reverting r55190, r55191, and r55192. They broke the build with this error message:
{standard input}:17:bad register name `%sil' make[4]: *** [libgcc/./_addvsi3.o] Error 1 make[4]: *** Waiting for unfinished jobs.... {standard input}:23:bad register name `%dil' {standard input}:28:bad register name `%dil' make[4]: *** [libgcc/./_addvdi3.o] Error 1 {standard input}:18:bad register name `%sil' make[4]: *** [libgcc/./_subvsi3.o] Error 1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp23
1 files changed, 8 insertions, 15 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index fb4de57..1462472 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -145,8 +145,6 @@ BasicBlock::iterator
FastISel::SelectInstructions(BasicBlock::iterator Begin,
BasicBlock::iterator End,
DenseMap<const Value*, unsigned> &ValueMap,
- std::map<const BasicBlock*,
- MachineBasicBlock *> &MBBMap,
MachineBasicBlock *mbb) {
MBB = mbb;
BasicBlock::iterator I = Begin;
@@ -197,24 +195,19 @@ FastISel::SelectInstructions(BasicBlock::iterator Begin,
case Instruction::Br: {
BranchInst *BI = cast<BranchInst>(I);
+ // For now, check for and handle just the most trivial case: an
+ // unconditional fall-through branch.
if (BI->isUnconditional()) {
- MachineFunction::iterator NextMBB =
+ MachineFunction::iterator NextMBB =
next(MachineFunction::iterator(MBB));
- BasicBlock *LLVMSucc = BI->getSuccessor(0);
- MachineBasicBlock *MSucc = MBBMap[LLVMSucc];
-
- if (NextMBB != MF.end() && MSucc == NextMBB) {
- // The unconditional fall-through case, which needs no instructions.
- } else {
- // The unconditional branch case.
- TII.InsertBranch(*MBB, MSucc, NULL, SmallVector<MachineOperand, 0>());
+ if (NextMBB != MF.end() &&
+ NextMBB->getBasicBlock() == BI->getSuccessor(0)) {
+ MBB->addSuccessor(NextMBB);
+ break;
}
- MBB->addSuccessor(MSucc);
- break;
}
- // Conditional branches are not handed yet.
- // Halt "fast" selection and bail.
+ // Something more complicated. Halt "fast" selection and bail.
return I;
}