.. _program_listing_file_lib_Target_DFGToDot_TranslateRegistration.cpp: Program Listing for File TranslateRegistration.cpp ================================================== |exhale_lsh| :ref:`Return to documentation for file ` (``lib/Target/DFGToDot/TranslateRegistration.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include "laksa-mlir/Dialect/DFG/IR/DFG.h" #include "laksa-mlir/Target/DFGToDot/DotEmitter.h" #include "mlir/InitAllDialects.h" #include "mlir/Tools/mlir-translate/Translation.h" using namespace mlir; namespace mlir { //===----------------------------------------------------------------------===// // Translation registration //===----------------------------------------------------------------------===// void registerDFGToDotTranslation() { TranslateFromMLIRRegistration reg( "dfg-to-dot", "translate DFG graph to Dot representation", [](Operation* op, raw_ostream &output) { return dfg::translateDFGToDot(op, output); }, [](DialectRegistry ®istry) { // Actor bodies retain computation dialects after DFG extraction, // even though the exporter only uses the graph topology. registerAllDialects(registry); registry.insert(); }); } } // namespace mlir