Fix pr24832.
[oota-llvm.git] / include / llvm / MC / MCInstrDesc.h
index ee802a6c68980918b06b78c3b6832f47f644a2c3..1baf82ee5c453babb8fabc6fd6098990752ce993 100644 (file)
@@ -125,7 +125,8 @@ enum Flag {
   ExtraDefRegAllocReq,
   RegSequence,
   ExtractSubreg,
-  InsertSubreg
+  InsertSubreg,
+  Convergent
 };
 }
 
@@ -153,7 +154,8 @@ public:
 
   // A complex method to determine is a certain is deprecated or not, and return
   // the reason for deprecation.
-  bool (*ComplexDeprecationInfo)(MCInst &, MCSubtargetInfo &, std::string &);
+  bool (*ComplexDeprecationInfo)(MCInst &, const MCSubtargetInfo &,
+                                 std::string &);
 
   /// \brief Returns the value of the specific constraint if
   /// it is set. Returns -1 if it is not set.
@@ -169,7 +171,7 @@ public:
 
   /// \brief Returns true if a certain instruction is deprecated and if so
   /// returns the reason in \p Info.
-  bool getDeprecatedInfo(MCInst &MI, MCSubtargetInfo &STI,
+  bool getDeprecatedInfo(MCInst &MI, const MCSubtargetInfo &STI,
                          std::string &Info) const;
 
   /// \brief Return the opcode number for this descriptor.
@@ -331,6 +333,13 @@ public:
   /// override accordingly.
   bool isInsertSubregLike() const { return Flags & (1 << MCID::InsertSubreg); }
 
+
+  /// \brief Return true if this instruction is convergent.
+  ///
+  /// Convergent instructions may not be made control-dependent on any
+  /// additional values.
+  bool isConvergent() const { return Flags & (1 << MCID::Convergent); }
+
   //===--------------------------------------------------------------------===//
   // Side Effect Analysis
   //===--------------------------------------------------------------------===//