[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocSimple.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 15 14:07:15 PST 2002
Changes in directory llvm/lib/CodeGen:
RegAllocSimple.cpp updated: 1.18 -> 1.19
---
Log message:
Simplify interfaces used by regalloc to insert code
---
Diffs of the changes:
Index: llvm/lib/CodeGen/RegAllocSimple.cpp
diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.18 llvm/lib/CodeGen/RegAllocSimple.cpp:1.19
--- llvm/lib/CodeGen/RegAllocSimple.cpp:1.18 Sun Dec 15 13:51:14 2002
+++ llvm/lib/CodeGen/RegAllocSimple.cpp Sun Dec 15 14:06:35 2002
@@ -199,7 +199,7 @@
PhysReg = getFreeReg(VirtReg);
// Add move instruction(s)
- return RegInfo->loadRegOffset2Reg(&MBB, I, PhysReg,
+ return RegInfo->loadRegOffset2Reg(MBB, I, PhysReg,
RegInfo->getFramePointer(),
-stackOffset, regClass->getDataSize());
}
@@ -215,7 +215,7 @@
unsigned stackOffset = allocateStackSpaceFor(VirtReg, regClass);
// Add move instruction(s)
- return RegInfo->storeReg2RegOffset(&MBB, I, PhysReg,
+ return RegInfo->storeReg2RegOffset(MBB, I, PhysReg,
RegInfo->getFramePointer(),
-stackOffset, regClass->getDataSize());
}
@@ -231,7 +231,7 @@
unsigned offset = allocateStackSpaceFor(PhysReg, regClass);
// Add move instruction(s)
- return RegInfo->storeReg2RegOffset(&MBB, I, PhysReg,
+ return RegInfo->storeReg2RegOffset(MBB, I, PhysReg,
RegInfo->getFramePointer(),
offset, regClass->getDataSize());
}
@@ -293,7 +293,7 @@
// Retrieve the constant value from this op, move it to target
// register of the phi
if (opVal.isImmediate()) {
- opI = RegInfo->moveImm2Reg(&opBlock, opI, physReg,
+ opI = RegInfo->moveImm2Reg(opBlock, opI, physReg,
(unsigned) opVal.getImmedValue(),
dataSize);
saveVirtRegToStack(opBlock, opI, virtualReg, physReg);
@@ -384,10 +384,7 @@
AllocateBasicBlock(*MBB);
// add prologue we should preserve callee-save registers...
- MachineFunction::iterator Fi = Fn.begin();
- MachineBasicBlock *MBB = Fi;
- MachineBasicBlock::iterator MBBi = MBB->begin();
- RegInfo->emitPrologue(MBB, MBBi, NumBytesAllocated);
+ RegInfo->emitPrologue(Fn, NumBytesAllocated);
const MachineInstrInfo &MII = TM.getInstrInfo();
@@ -400,7 +397,7 @@
MachineInstr *MI = *--I;
if (MII.isReturn(MI->getOpcode())) {
// this block has a return instruction, add epilogue
- RegInfo->emitEpilogue(MBB, I, NumBytesAllocated);
+ RegInfo->emitEpilogue(*MBB, NumBytesAllocated);
}
}
More information about the llvm-commits
mailing list