From 8776a09ee76515e6ad8dae9fde61e1232bb59cfa Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Mon, 9 Dec 2024 22:17:52 +0100 Subject: [PATCH 1/2] Add print flags for debugging purposes --- clang/include/clang/Driver/Options.td | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index 1da38e011f8325..170b7d28cfe52c 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -8832,3 +8832,15 @@ def print_model_info : Flag<["--"], "print-model-info">, def print_statistics : Flag<["--"], "print-statistics">, Visibility<[MC1Option]>, HelpText<"Print compilation statistics">; + +def print_ir_before_pass : Joined<["--"], "print-ir-before-pass=">, + Visibility<[MC1Option]>, + HelpText<"Print the IR before a certain pass">; + +def print_ir_after_pass : Joined<["--"], "print-ir-after-pass=">, + Visibility<[MC1Option]>, + HelpText<"Print the IR after a certain pass">; + +def print_ir_on_failure : Flag<["--"], "print-ir-on-failure">, + Visibility<[MC1Option]>, + HelpText<"Print information about the model being compiled">; From cdf268e43a5b5f0778d7123fad48a48c4a4c3010 Mon Sep 17 00:00:00 2001 From: Michele Scuttari Date: Mon, 9 Dec 2024 22:32:46 +0100 Subject: [PATCH 2/2] Remove manual forwardings of frontend-only arguments --- clang/lib/Driver/ToolChains/Marco.cpp | 30 +-------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Marco.cpp b/clang/lib/Driver/ToolChains/Marco.cpp index f0c23d625c670d..c9153d7b8b3e8d 100644 --- a/clang/lib/Driver/ToolChains/Marco.cpp +++ b/clang/lib/Driver/ToolChains/Marco.cpp @@ -47,35 +47,7 @@ void Marco::addMarcoOptions(const ArgList &Args, ArgStringList &CmdArgs) const { options::OPT_model, options::OPT_solver, options::OPT_variable_filter, - options::OPT_multithreading, - options::OPT_no_multithreading, - options::OPT_assertions, - options::OPT_no_assertions, - options::OPT_bit_width, - options::OPT_function_inlining, - options::OPT_no_function_inlining, - options::OPT_output_arrays_promotion, - options::OPT_no_output_arrays_promotion, - options::OPT_read_only_variables_propagation, - options::OPT_no_read_only_variables_propagation, - options::OPT_variables_to_parameters_promotion, - options::OPT_no_variables_to_parameters_promotion, - options::OPT_cse, - options::OPT_no_cse, - options::OPT_function_calls_cse, - options::OPT_no_function_calls_cse, - options::OPT_equations_runtime_scheduling, - options::OPT_no_equations_runtime_scheduling, - options::OPT_omp, - options::OPT_no_omp, - options::OPT_ida_reduced_system, - options::OPT_no_ida_reduced_system, - options::OPT_ida_reduced_derivatives, - options::OPT_no_ida_reduced_derivatives, - options::OPT_ida_jacobian_one_sweep, - options::OPT_no_ida_jacobian_one_sweep, - options::OPT_print_model_info, - options::OPT_print_statistics}); + options::OPT_bit_width}); } void Marco::ConstructJob(Compilation &C, const JobAction &JA,