Skip to content

Commit

Permalink
[CIR] Disable -fclangir-call-conv-lowering from default in the LLVM…
Browse files Browse the repository at this point in the history
… pipeline

This is causing lots of churn. `-fclangir-call-conv-lowering` is not mature
enough, assumptions are leading to crashes we cannot track with special
messages, leading to not great user experience. Turn this off until we have
someone dedicated to roll this out.
  • Loading branch information
bcardosolopes committed Oct 16, 2024
1 parent 078965e commit 6cf9c5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -3070,7 +3070,7 @@ defm clangir_analysis_only : BoolFOption<"clangir-analysis-only",
// FIXME(cir): Remove this option once all pre-existing tests are compatible with
// the calling convention lowering pass.
defm clangir_call_conv_lowering : BoolFOption<"clangir-call-conv-lowering",
FrontendOpts<"ClangIRCallConvLowering">, DefaultTrue,
FrontendOpts<"ClangIRCallConvLowering">, DefaultFalse,
PosFlag<SetTrue, [], [ClangOption, CC1Option], "Transform CIR to abide to calling convetions during lowering">,
NegFlag<SetFalse, [], [ClangOption, CC1Option], "Ignore calling convetion during lowering">,
BothFlags<[], [ClangOption, CC1Option], "">>;
Expand Down
2 changes: 2 additions & 0 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5152,6 +5152,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,

Args.addOptOutFlag(CmdArgs, options::OPT_fclangir_call_conv_lowering,
options::OPT_fno_clangir_call_conv_lowering);
Args.addOptInFlag(CmdArgs, options::OPT_fclangir_call_conv_lowering,
options::OPT_fno_clangir_call_conv_lowering);
if (Args.hasArg(options::OPT_fclangir_mem2reg))
CmdArgs.push_back("-fclangir-mem2reg");

Expand Down
2 changes: 1 addition & 1 deletion clang/test/CIR/Driver/callconv.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clang %s -fno-clangir-call-conv-lowering -### -c %s 2>&1 | FileCheck --check-prefix=DISABLE %s
// DISABLE: "-fno-clangir-call-conv-lowering"
// RUN: %clang %s -fclangir-call-conv-lowering -### -c %s 2>&1 | FileCheck --check-prefix=ENABLE %s
// ENABLE-NOT: "-fclangir-call-conv-lowering"
// ENABLE: "-fclangir-call-conv-lowering"

0 comments on commit 6cf9c5d

Please sign in to comment.