inline a simple method
authorChris Lattner <sabre@nondot.org>
Wed, 3 May 2006 17:21:32 +0000 (17:21 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 3 May 2006 17:21:32 +0000 (17:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28083 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86CodeEmitter.cpp

index 4dd95598a6f5e6c07285de1fa09459492327fef7..d0f76931fb69b07ae16858ca6892731948d8daa6 100644 (file)
@@ -50,7 +50,6 @@ namespace {
     void emitInstruction(const MachineInstr &MI);
 
   private:
-    void emitBasicBlock(MachineBasicBlock &MBB);
     void emitPCRelativeBlockAddress(MachineBasicBlock *MBB);
     void emitPCRelativeValue(unsigned Address);
     void emitGlobalAddressForCall(GlobalValue *GV, bool isTailCall);
@@ -84,8 +83,13 @@ bool Emitter::runOnMachineFunction(MachineFunction &MF) {
     BBRefs.clear();
 
     MCE.startFunction(MF);
-    for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I)
-      emitBasicBlock(*I);
+    for (MachineFunction::iterator MBB = MF.begin(), E = MF.end(); 
+         MBB != E; ++MBB) {
+      MCE.StartMachineBasicBlock(MBB);
+      for (MachineBasicBlock::const_iterator I = MBB->begin(), E = MBB->end();
+           I != E; ++I)
+        emitInstruction(*I);
+    }
   } while (MCE.finishFunction(MF));
 
   // Resolve all forward branches now.
@@ -98,13 +102,6 @@ bool Emitter::runOnMachineFunction(MachineFunction &MF) {
   return false;
 }
 
-void Emitter::emitBasicBlock(MachineBasicBlock &MBB) {
-  MCE.StartMachineBasicBlock(&MBB);
-  for (MachineBasicBlock::const_iterator I = MBB.begin(), E = MBB.end();
-       I != E; ++I)
-    emitInstruction(*I);
-}
-
 /// emitPCRelativeValue - Emit a 32-bit PC relative address.
 ///
 void Emitter::emitPCRelativeValue(unsigned Address) {