16 #include "llvm/Support/CommandLine.h"
27 static llvm::cl::opt<bool> declareVariablesAtTop(
28 "declare-variables-at-top",
29 llvm::cl::desc(
"Declare variables at top when emitting C/C++"),
30 llvm::cl::init(
false));
33 "mlir-to-cpp",
"translate from mlir to cpp",
37 declareVariablesAtTop);
41 registry.insert<cf::ControlFlowDialect,
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
Operation is the basic unit of execution within MLIR.
LogicalResult translateToCpp(Operation *op, raw_ostream &os, bool declareVariablesAtTop=false)
Translates the given operation to C++ code.
Include the generated interface declarations.
void registerToCppTranslation()