[llvm] r263261 - [MachineIRBuilder] Rename the setter for MBB for consistency with the getter.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 09:27:47 PST 2016
Author: qcolombet
Date: Fri Mar 11 11:27:47 2016
New Revision: 263261
URL: http://llvm.org/viewvc/llvm-project?rev=263261&view=rev
Log:
[MachineIRBuilder] Rename the setter for MBB for consistency with the getter.
Modified:
llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Modified: llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h?rev=263261&r1=263260&r2=263261&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h Fri Mar 11 11:27:47 2016
@@ -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.
Modified: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp?rev=263261&r1=263260&r2=263261&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp Fri Mar 11 11:27:47 2016
@@ -112,7 +112,7 @@ bool IRTranslator::runOnMachineFunction(
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));
@@ -123,7 +123,9 @@ bool IRTranslator::runOnMachineFunction(
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) {
Modified: llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp?rev=263261&r1=263260&r2=263261&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp Fri Mar 11 11:27:47 2016
@@ -28,7 +28,7 @@ void MachineIRBuilder::setFunction(Machi
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(Mac
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;
}
More information about the llvm-commits
mailing list