[llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrInfo.cpp SparcInstrInfo.h

Evan Cheng evan.cheng at apple.com
Thu May 17 17:17:46 PDT 2007



Changes in directory llvm/lib/Target/Sparc:

SparcInstrInfo.cpp updated: 1.17 -> 1.18
SparcInstrInfo.h updated: 1.10 -> 1.11
---
Log message:

RemoveBranch() and InsertBranch() now returns number of instructions deleted / inserted.

---
Diffs of the changes:  (+8 -6)

 SparcInstrInfo.cpp |    8 +++++---
 SparcInstrInfo.h   |    6 +++---
 2 files changed, 8 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.17 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.18
--- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.17	Mon Nov 27 17:37:22 2006
+++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp	Thu May 17 19:17:28 2007
@@ -97,10 +97,12 @@
   return 0;
 }
 
-void SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB,
-                                  MachineBasicBlock *FBB,
-                                  const std::vector<MachineOperand> &Cond)const{
+unsigned
+SparcInstrInfo::InsertBranch(MachineBasicBlock &MBB,MachineBasicBlock *TBB,
+                             MachineBasicBlock *FBB,
+                             const std::vector<MachineOperand> &Cond)const{
   // Can only insert uncond branches so far.
   assert(Cond.empty() && !FBB && TBB && "Can only handle uncond branches!");
   BuildMI(&MBB, get(SP::BA)).addMBB(TBB);
+  return 1;
 }


Index: llvm/lib/Target/Sparc/SparcInstrInfo.h
diff -u llvm/lib/Target/Sparc/SparcInstrInfo.h:1.10 llvm/lib/Target/Sparc/SparcInstrInfo.h:1.11
--- llvm/lib/Target/Sparc/SparcInstrInfo.h:1.10	Tue Oct 24 11:39:19 2006
+++ llvm/lib/Target/Sparc/SparcInstrInfo.h	Thu May 17 19:17:28 2007
@@ -63,9 +63,9 @@
   virtual unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
   
   
-  virtual void InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
-                            MachineBasicBlock *FBB,
-                            const std::vector<MachineOperand> &Cond) const;
+  virtual unsigned InsertBranch(MachineBasicBlock &MBB, MachineBasicBlock *TBB,
+                                MachineBasicBlock *FBB,
+                                const std::vector<MachineOperand> &Cond) const;
 };
 
 }






More information about the llvm-commits mailing list