Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | public: | ||||
/// Set the output format to bytecode instead of textual IR. | /// Set the output format to bytecode instead of textual IR. | ||||
MlirOptMainConfig &emitBytecode(bool emit) { | MlirOptMainConfig &emitBytecode(bool emit) { | ||||
emitBytecodeFlag = emit; | emitBytecodeFlag = emit; | ||||
return *this; | return *this; | ||||
} | } | ||||
bool shouldEmitBytecode() const { return emitBytecodeFlag; } | bool shouldEmitBytecode() const { return emitBytecodeFlag; } | ||||
/// Enable the debugger action hook: it makes the debugger able to intercept | |||||
/// MLIR Actions. | |||||
void enableDebuggerActionHook(bool enabled = true) { | |||||
enableDebuggerActionHookFlag = enabled; | |||||
} | |||||
/// Return true if the Debugger action hook is enabled. | |||||
bool isDebuggerActionHookEnabled() const { | |||||
return enableDebuggerActionHookFlag; | |||||
} | |||||
/// Set the IRDL file to load before processing the input. | /// Set the IRDL file to load before processing the input. | ||||
MlirOptMainConfig &setIrdlFile(StringRef file) { | MlirOptMainConfig &setIrdlFile(StringRef file) { | ||||
irdlFileFlag = file; | irdlFileFlag = file; | ||||
return *this; | return *this; | ||||
} | } | ||||
StringRef getIrdlFile() const { return irdlFileFlag; } | StringRef getIrdlFile() const { return irdlFileFlag; } | ||||
/// Set the filename to use for logging actions, use "-" for stdout. | /// Set the filename to use for logging actions, use "-" for stdout. | ||||
▲ Show 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | protected: | ||||
bool allowUnregisteredDialectsFlag = false; | bool allowUnregisteredDialectsFlag = false; | ||||
/// Print the pipeline that will be run. | /// Print the pipeline that will be run. | ||||
bool dumpPassPipelineFlag = false; | bool dumpPassPipelineFlag = false; | ||||
/// Emit bytecode instead of textual assembly when generating output. | /// Emit bytecode instead of textual assembly when generating output. | ||||
bool emitBytecodeFlag = false; | bool emitBytecodeFlag = false; | ||||
/// Enable the Debugger action hook: Debugger can intercept MLIR Actions. | |||||
bool enableDebuggerActionHookFlag = false; | |||||
/// IRDL file to register before processing the input. | /// IRDL file to register before processing the input. | ||||
std::string irdlFileFlag = ""; | std::string irdlFileFlag = ""; | ||||
/// Log action execution to the given file (or "-" for stdout) | /// Log action execution to the given file (or "-" for stdout) | ||||
std::string logActionsToFlag; | std::string logActionsToFlag; | ||||
/// Location Breakpoints to filter the action logging. | /// Location Breakpoints to filter the action logging. | ||||
std::vector<tracing::BreakpointManager *> logActionLocationFilter; | std::vector<tracing::BreakpointManager *> logActionLocationFilter; | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |