/// Set the insertion point to the beginning (\p Beginning = true) or end
/// (\p Beginning = false) of \p MBB.
/// \pre \p MBB must be contained by getMF().
- void setBasicBlock(MachineBasicBlock &MBB, bool Beginning = false);
+ void setMBB(MachineBasicBlock &MBB, bool Beginning = false);
/// Set the insertion point to before (\p Before = true) or after
/// (\p Before = false) \p MI.
MRI = &MF.getRegInfo();
// Setup the arguments.
MachineBasicBlock &MBB = getOrCreateBB(F.front());
- MIRBuilder.setBasicBlock(MBB);
+ MIRBuilder.setMBB(MBB);
SmallVector<unsigned, 8> VRegArgs;
for (const Argument &Arg: F.args())
VRegArgs.push_back(getOrCreateVReg(&Arg));
for (const BasicBlock &BB: F) {
MachineBasicBlock &MBB = getOrCreateBB(BB);
- MIRBuilder.setBasicBlock(MBB);
+ // Set the insertion point of all the following translations to
+ // the end of this basic block.
+ MIRBuilder.setMBB(MBB);
for (const Instruction &Inst: BB) {
bool Succeeded = translate(Inst);
if (!Succeeded) {
this->MI = nullptr;
}
-void MachineIRBuilder::setBasicBlock(MachineBasicBlock &MBB, bool Beginning) {
+void MachineIRBuilder::setMBB(MachineBasicBlock &MBB, bool Beginning) {
this->MBB = &MBB;
Before = Beginning;
assert(&getMF() == MBB.getParent() &&
void MachineIRBuilder::setInstr(MachineInstr &MI, bool Before) {
assert(MI.getParent() && "Instruction is not part of a basic block");
- setBasicBlock(*MI.getParent());
+ setMBB(*MI.getParent());
this->MI = &MI;
this->Before = Before;
}