MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / generateOpWriterImplementations

Function generateOpWriterImplementations

tools/cuda-tile-tblgen/BytecodeGen.cpp:659–680  ·  view source on GitHub ↗

Generates the implementations of the individual op writer functions.

Source from the content-addressed store, hash-verified

657
658/// Generates the implementations of the individual op writer functions.
659static void generateOpWriterImplementations(const RecordKeeper &records,
660 raw_ostream &os) {
661
662 emitSourceFileHeader("Generated Bytecode Writers", os);
663 auto opDefs = records.getAllDerivedDefinitions("Op");
664 os << "//"
665 "===-------------------------------------------------------------------"
666 "---===//\n"
667 << "// Writer Functions\n"
668 << "//"
669 "===-------------------------------------------------------------------"
670 "---===//\n\n";
671 for (const Record *opDef : opDefs)
672 generateOpWriter(Operator(opDef), os);
673 os << "//"
674 "===-------------------------------------------------------------------"
675 "---===//\n"
676 << "// End of generated functions.\n"
677 << "//"
678 "===-------------------------------------------------------------------"
679 "---===//\n";
680}
681
682/// Generates the TypeSwitch statement for dispatching to op-specific writers.
683/// Returns FailureOr<size_t> where size_t is the number of serialized results.

Callers 1

generateBytecodeFunction · 0.85

Calls 1

generateOpWriterFunction · 0.85

Tested by

no test coverage detected