From: Quentin Colombet Date: Fri, 11 Mar 2016 17:27:47 +0000 (+0000) Subject: [MachineIRBuilder] Rename the setter for MBB for consistency with the getter. X-Git-Tag: llvmorg-3.9.0-rc1~11949 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91ebd71e26660d2120905ac506065fd6321f1ff5;p=platform%2Fupstream%2Fllvm.git [MachineIRBuilder] Rename the setter for MBB for consistency with the getter. llvm-svn: 263261 --- diff --git a/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h b/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h index 01bf6ad..7db3efb 100644 --- a/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h +++ b/llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h @@ -74,7 +74,7 @@ public: /// 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. diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp index 3e0c0ec..f8a5e04 100644 --- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp +++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp @@ -112,7 +112,7 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { MRI = &MF.getRegInfo(); // Setup the arguments. MachineBasicBlock &MBB = getOrCreateBB(F.front()); - MIRBuilder.setBasicBlock(MBB); + MIRBuilder.setMBB(MBB); SmallVector VRegArgs; for (const Argument &Arg: F.args()) VRegArgs.push_back(getOrCreateVReg(&Arg)); @@ -123,7 +123,9 @@ bool IRTranslator::runOnMachineFunction(MachineFunction &MF) { 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) { diff --git a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp index ded6407..5e0cbb1 100644 --- a/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp +++ b/llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp @@ -28,7 +28,7 @@ void MachineIRBuilder::setFunction(MachineFunction &MF) { 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() && @@ -37,7 +37,7 @@ void MachineIRBuilder::setBasicBlock(MachineBasicBlock &MBB, bool Beginning) { 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; }