19 #include "llvm/Support/Debug.h"
21 #define DEBUG_TYPE "spirv-serialization"
25 SmallVectorImpl<uint32_t> &binary,
26 const SerializationOptions &
options) {
27 if (!module.getVceTriple())
28 return module.emitError(
29 "module must have 'vce_triple' attribute to be serializeable");
31 Serializer serializer(module,
options);
33 if (failed(serializer.serialize()))
36 LLVM_DEBUG(serializer.printValueIDMap(llvm::dbgs()));
38 serializer.collect(binary);
static llvm::ManagedStatic< PassManagerOptions > options
LogicalResult serialize(ModuleOp module, SmallVectorImpl< uint32_t > &binary, const SerializationOptions &options={})
Serializes the given SPIR-V module and writes to binary.
Include the generated interface declarations.