AA metadata refactoring (introduce AAMDNodes)
[oota-llvm.git] / include / llvm / IR / Instruction.h
index bac6a95b1b71b71810f2a0709b5c68509d0fd43d..3a68ed145304e9b6025104115b58dd62b2f32a98 100644 (file)
@@ -25,6 +25,7 @@ namespace llvm {
 class FastMathFlags;
 class LLVMContext;
 class MDNode;
+struct AAMDNodes;
 
 template<typename ValueSubClass, typename ItemParentClass>
   class SymbolTableListTraits;
@@ -168,6 +169,11 @@ public:
       getAllMetadataOtherThanDebugLocImpl(MDs);
   }
 
+  /// getAAMetadata - Fills the AAMDNodes structure with AA metadata from
+  /// this instruction. When Merge is true, the existing AA metadata is
+  /// merged with that from this instruction providing the most-general result.
+  void getAAMetadata(AAMDNodes &N, bool Merge = false) const;
+
   /// setMetadata - Set the metadata of the specified kind to the specified
   /// node.  This updates/replaces metadata if already present, or removes it if
   /// Node is null.
@@ -189,6 +195,10 @@ public:
     return dropUnknownMetadata(IDs);
   }
 
+  /// setAAMetadata - Sets the metadata on this instruction from the
+  /// AAMDNodes structure.
+  void setAAMetadata(const AAMDNodes &N);
+
   /// setDebugLoc - Set the debug location information for this instruction.
   void setDebugLoc(const DebugLoc &Loc) { DbgLoc = Loc; }