[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocSimple.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 15 02:04:01 PST 2002
Changes in directory llvm/lib/CodeGen:
RegAllocSimple.cpp updated: 1.12 -> 1.13
---
Log message:
Fix borkness with not using MachineBasicBlocks in PHI nodes
---
Diffs of the changes:
Index: llvm/lib/CodeGen/RegAllocSimple.cpp
diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.12 llvm/lib/CodeGen/RegAllocSimple.cpp:1.13
--- llvm/lib/CodeGen/RegAllocSimple.cpp:1.12 Fri Dec 13 06:33:31 2002
+++ llvm/lib/CodeGen/RegAllocSimple.cpp Sun Dec 15 02:02:51 2002
@@ -267,18 +267,7 @@
// 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();
More information about the llvm-commits
mailing list