Introduce a helper to combine instruction metadata.
[oota-llvm.git] / include / llvm / Transforms / Utils / Local.h
index c0c690664a9c50330993d16093e598b5ddfc8570..81018598099851e772284eb7919a2f9935921e29 100644 (file)
@@ -275,6 +275,11 @@ bool replaceDbgDeclareForAlloca(AllocaInst *AI, Value *NewAllocaAddress,
 /// Returns true if any basic block was removed.
 bool removeUnreachableBlocks(Function &F);
 
+/// \brief Combine the metadata of two instructions so that K can replace J
+///
+/// Metadata not listed as known via KnownIDs is removed
+void combineMetadata(Instruction *K, const Instruction *J, ArrayRef<unsigned> KnownIDs);
+
 } // End llvm namespace
 
 #endif