[MachineIRBuilder] Rename the setter for MBB for consistency with the getter.
authorQuentin Colombet <qcolombet@apple.com>
Fri, 11 Mar 2016 17:27:47 +0000 (17:27 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 11 Mar 2016 17:27:47 +0000 (17:27 +0000)
llvm-svn: 263261

llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp

index 01bf6ad..7db3efb 100644 (file)
@@ -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.
index 3e0c0ec..f8a5e04 100644 (file)
@@ -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<unsigned, 8> 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) {
index ded6407..5e0cbb1 100644 (file)
@@ -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;
 }