OSDN Git Service

implement TII::insertNoop
authorChris Lattner <sabre@nondot.org>
Sun, 5 Mar 2006 23:49:55 +0000 (23:49 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 5 Mar 2006 23:49:55 +0000 (23:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26562 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCInstrInfo.cpp
lib/Target/PowerPC/PPCInstrInfo.h
lib/Target/PowerPC/PPCInstrInfo.td

index 211a272..c7f33c8 100644 (file)
@@ -146,3 +146,8 @@ MachineInstr *PPCInstrInfo::commuteInstruction(MachineInstr *MI) const {
   MI->getOperand(5).setImmedValue((MB-1) & 31);
   return MI;
 }
+
+void PPCInstrInfo::insertNoop(MachineBasicBlock &MBB, 
+                              MachineBasicBlock::iterator MI) const {
+  BuildMI(MBB, MI, PPC::NOP, 0);
+}
index f046e5d..b10de48 100644 (file)
@@ -46,6 +46,9 @@ public:
   // rotate amt is zero.  We also have to munge the immediates a bit.
   virtual MachineInstr *commuteInstruction(MachineInstr *MI) const;
   
+  virtual void insertNoop(MachineBasicBlock &MBB, 
+                          MachineBasicBlock::iterator MI) const;
+
   static unsigned invertPPCBranchOpcode(unsigned Opcode) {
     switch (Opcode) {
     default: assert(0 && "Unknown PPC branch opcode!");
index 881b17a..dba64c1 100644 (file)
@@ -229,7 +229,6 @@ let usesCustomDAGSchedInserter = 1 in {  // Expanded by the scheduler.
                               i32imm:$BROPC), "; SELECT_CC PSEUDO!", []>;
 }
 
-
 let isTerminator = 1, noResults = 1 in {
   let isReturn = 1 in
     def BLR : XLForm_2_ext<19, 16, 20, 0, 0, (ops), "blr", BrB, [(retflag)]>;