diff --git a/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp b/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp index 1d4602dd12dcc..2c3a06c2f7dd3 100644 --- a/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp +++ b/compiler/src/iree/compiler/API2/Internal/IREEOptToolEntryPoint.cpp @@ -18,6 +18,9 @@ #include "mlir/Tools/mlir-opt/MlirOptMain.h" int ireeOptRunMain(int argc, char **argv) { + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); llvm::InitLLVM y(argc, argv); mlir::DialectRegistry registry; diff --git a/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp b/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp index 37521ab115f9b..4e5b645bbd2a2 100644 --- a/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp +++ b/compiler/src/iree/compiler/API2/Internal/LLDToolEntryPoint.cpp @@ -69,6 +69,9 @@ static Flavor parseFlavor(std::vector &v) { } int ireeCompilerRunLldMain(int argc, char **argv) { + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); InitLLVM x(argc, argv); sys::Process::UseANSIEscapeCodes(true); bool exitEarly = true; diff --git a/compiler/src/iree/compiler/Tools/iree_compile_lib.cc b/compiler/src/iree/compiler/Tools/iree_compile_lib.cc index 37884b3f1a138..220ae7afd1713 100644 --- a/compiler/src/iree/compiler/Tools/iree_compile_lib.cc +++ b/compiler/src/iree/compiler/Tools/iree_compile_lib.cc @@ -49,6 +49,9 @@ enum class CompileMode { } // namespace mlir int mlir::iree_compiler::runIreecMain(int argc, char **argv) { + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); llvm::InitLLVM y(argc, argv); static llvm::cl::OptionCategory mainOptions("IREE Main Options"); ireeCompilerGlobalInitialize(/*initializeCommandLine=*/true); diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp index 6962815df9583..235a1e4585a92 100644 --- a/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp +++ b/integrations/tensorflow/iree_tf_compiler/iree-import-tf-main.cpp @@ -129,6 +129,9 @@ static OwningOpRef importSavedModelV1( int main(int argc, char **argv) { tensorflow::InitMlir y(&argc, &argv); + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); static cl::opt inputPath( cl::Positional, cl::desc(""), cl::Required); diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp index 664cf37969546..a17238a0c61b9 100644 --- a/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp +++ b/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp @@ -36,6 +36,9 @@ enum class OutputFormat { }; int main(int argc, char **argv) { + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); llvm::InitLLVM y(argc, argv); static cl::opt inputPath( diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp index a7da555946f56..5f57245c0effd 100644 --- a/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp +++ b/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp @@ -103,6 +103,9 @@ LogicalResult ReadHloTextFormatFromStream(std::istream *in, } // namespace int main(int argc, char **argv) { + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); llvm::InitLLVM y(argc, argv); static cl::opt inputPath( diff --git a/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp index 044ebdbcfb8c8..0110088336f9c 100644 --- a/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp +++ b/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp @@ -23,6 +23,17 @@ #include "tensorflow/compiler/mlir/tosa/transforms/passes.h" int main(int argc, char **argv) { + static cl::opt inputPath( + cl::Positional, cl::desc(""), cl::Required); + static cl::opt outputFilename("o", cl::desc("Output filename"), + cl::value_desc("filename"), + cl::init("-")); + static llvm::cl::opt saveTempMhloInput( + "save-temp-mhlo-input", + llvm::cl::desc("Save the MHLO pipeline input IR to this file"), + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); llvm::InitLLVM y(argc, argv); mlir::DialectRegistry registry; diff --git a/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp index 5fd5a042d22d5..5da1227f90881 100644 --- a/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp +++ b/integrations/tensorflow/iree_tf_compiler/iree-tf-opt-main.cpp @@ -27,6 +27,9 @@ #include "tensorflow/compiler/mlir/tosa/transforms/passes.h" int main(int argc, char **argv) { + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); llvm::InitLLVM y(argc, argv); mlir::DialectRegistry registry; diff --git a/tools/iree-opt-main.cc b/tools/iree-opt-main.cc index c84199b982b1d..580624b5df398 100644 --- a/tools/iree-opt-main.cc +++ b/tools/iree-opt-main.cc @@ -10,4 +10,9 @@ #include "iree/compiler/API2/ToolEntryPoints.h" -int main(int argc, char **argv) { return ireeOptRunMain(argc, argv); } +int main(int argc, char **argv) { + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); + return ireeOptRunMain(argc, argv); +} diff --git a/tools/iree-run-mlir-main.cc b/tools/iree-run-mlir-main.cc index bc46dd9045800..ba7ffee3d735e 100644 --- a/tools/iree-run-mlir-main.cc +++ b/tools/iree-run-mlir-main.cc @@ -573,6 +573,9 @@ extern "C" int main(int argc_llvm, char** argv_llvm) { // On Windows InitLLVM re-queries the command line from Windows directly and // totally messes up the array. + llvm::setBugReportMsg( + "Please report issues to https://github.com/iree-org/iree/issues and " + "include the crash backtrace.\n"); llvm::InitLLVM init_llvm(argc_llvm, argv_llvm); llvm::cl::ParseCommandLineOptions(argc_llvm, argv_llvm);