Use MachineBasicBlock::transferSuccessors.
[oota-llvm.git] / include / llvm / Target / TargetInstrInfo.h
index f9fd6ab30d82b388831584c0705b1d9820af5139..a2dc86f4a3ad08c028c80e1ee4ce8f7985a64c32 100644 (file)
@@ -155,7 +155,10 @@ public:
   /// return a new machine instruction.  If an instruction cannot commute, it
   /// can also return null.
   ///
-  virtual MachineInstr *commuteInstruction(MachineInstr *MI) const = 0;
+  /// If NewMI is true, then a new machine instruction must be created.
+  ///
+  virtual MachineInstr *commuteInstruction(MachineInstr *MI,
+                                           bool NewMI = false) const = 0;
 
   /// CommuteChangesDestination - Return true if commuting the specified
   /// instruction will also changes the destination operand. Also return the
@@ -411,7 +414,8 @@ protected:
   TargetInstrInfoImpl(const TargetInstrDesc *desc, unsigned NumOpcodes)
   : TargetInstrInfo(desc, NumOpcodes) {}
 public:
-  virtual MachineInstr *commuteInstruction(MachineInstr *MI) const;
+  virtual MachineInstr *commuteInstruction(MachineInstr *MI,
+                                           bool NewMI = false) const;
   virtual bool CommuteChangesDestination(MachineInstr *MI,
                                          unsigned &OpIdx) const;
   virtual bool PredicateInstruction(MachineInstr *MI,