summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-15 08:02:51 +0000
committerChris Lattner <sabre@nondot.org>2002-12-15 08:02:51 +0000
commit477af9d0fa241c67cb35e7178c19a32a3eee4e7a (patch)
tree698eb5b269a52dbb4ff821861e96b70093703b27 /llvm/lib
parent3263e5787fd70559efe0518aa9f4f14c3e4197f9 (diff)
downloadbcm5719-llvm-477af9d0fa241c67cb35e7178c19a32a3eee4e7a.tar.gz
bcm5719-llvm-477af9d0fa241c67cb35e7178c19a32a3eee4e7a.zip
Fix borkness with not using MachineBasicBlocks in PHI nodes
llvm-svn: 5035
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegAllocSimple.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/RegAllocSimple.cpp b/llvm/lib/CodeGen/RegAllocSimple.cpp
index cbe131c81d0..c255bdab14b 100644
--- a/llvm/lib/CodeGen/RegAllocSimple.cpp
+++ b/llvm/lib/CodeGen/RegAllocSimple.cpp
@@ -267,18 +267,7 @@ bool RegAllocSimple::runOnMachineFunction(MachineFunction &Fn) {
// Get the MachineBasicBlock equivalent of the BasicBlock that is the
// source path the phi
- BasicBlock *opBB =
- cast<BasicBlock>(MI->getOperand(i).getVRegValue());
- MachineBasicBlock *opBlock = NULL;
- for (MachineFunction::iterator opFi = Fn.begin(), opFe = Fn.end();
- opFi != opFe; ++opFi)
- {
- if (opFi->getBasicBlock() == opBB) {
- opBlock = opFi; break;
- }
- }
- assert(opBlock && "MachineBasicBlock object not found for specified block!");
-
+ MachineBasicBlock *opBlock = MI->getOperand(i).getMachineBasicBlock();
MachineBasicBlock::iterator opI = opBlock->end();
MachineInstr *opMI = *(--opI);
const MachineInstrInfo &MII = TM.getInstrInfo();
OpenPOWER on IntegriCloud