Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
[oota-llvm.git] / include / llvm / Target / TargetInstrInfo.h
index 6f8eb1cdb84c79e6f8d39396e65c9060312aabf8..1ea4a9633201afa445caeeaa587113b0c9b0f86f 100644 (file)
@@ -195,9 +195,13 @@ public:
   /// Note that RemoveBranch and InsertBranch must be implemented to support
   /// cases where this method returns success.
   ///
+  /// If AllowModify is true, then this routine is allowed to modify the basic
+  /// block (e.g. delete instructions after the unconditional branch).
+  ///
   virtual bool AnalyzeBranch(MachineBasicBlock &MBB, MachineBasicBlock *&TBB,
                              MachineBasicBlock *&FBB,
-                             SmallVectorImpl<MachineOperand> &Cond) const {
+                             SmallVectorImpl<MachineOperand> &Cond,
+                             bool AllowModify = false) const {
     return true;
   }