[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Do I miss something? The performance and file size is similar with and > without `-fgen-reduced-bmi`. To reproduce clone > https://github.com/koplas/clang-modules-test and run `build.sh` and > `build_thin_bmi.sh`. Currently, the Reduced BMI will only remove function

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Using `-fgen-reduced-bmi` currently fails for me with a case that looks like > this: > > ```c++ > // a.hpp > template > void ignore(T const &) noexcept {} > > inline void resultCheck(char const *message) { > ignore(message); > } > > // b.cppm >

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @iains @dwblaikie Understood. And I thought the major problem is that there are a lot flags from clang modules. And it is indeed confusing. But given we have to introduce new flags in this case, probably we can only try to make it more clear by better documents.

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 93f9fb2c825dba48db64d5f726b54bcbd4766009 527b69efe66961aa7d7febcdda66f042f50adf2b --

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -3031,6 +3032,11 @@ defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", "Perform ODR checks for decls in the global module fragment.">>, Group; +def gen_reduced_bmi : Flag<["-"], "fgen-reduced-bmi">, ChuanqiXu9 wrote: Done

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
@@ -0,0 +1,53 @@ +// It is annoying to handle different slash direction +// in Windows and Linux. So we disable the test on Windows +// here. +// REQUIRES: !system-windows ChuanqiXu9 wrote: Done https://github.com/llvm/llvm-project/pull/85050

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 5fcccd75d0823ff11a4e385565cad65034d0def7 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/2] [C++20] [Modules] Introduce -fgen-reduced-bmi ---

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread David Blaikie via cfe-commits
dwblaikie wrote: +1 to @iains's comments about being careful about the introduction and naming of driver flags & probably avoid it in this case, if possible, or try to make it clearly experimental. https://github.com/llvm/llvm-project/pull/85050 ___

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Iain Sandoe via cfe-commits
https://github.com/iains edited https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Iain Sandoe via cfe-commits
@@ -3031,6 +3032,11 @@ defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", "Perform ODR checks for decls in the global module fragment.">>, Group; +def gen_reduced_bmi : Flag<["-"], "fgen-reduced-bmi">, iains wrote: If this is

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-25 Thread Iain Sandoe via cfe-commits
https://github.com/iains commented: I have no issue with the general intention or phasing here; my main concern is that we are introducing [yet] another user-facing modules option that actually we intend will become irrelevant after a few releases. In practice, removing user-facing options

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,53 @@ +// It is annoying to handle different slash direction +// in Windows and Linux. So we disable the test on Windows +// here. +// REQUIRES: !system-windows MaskRay wrote: UNSUPPORTED is much more common

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,53 @@ +// It is annoying to handle different slash direction +// in Windows and Linux. So we disable the test on Windows +// here. +// REQUIRES: !system-windows +// On AIX, the default output for `-c` may be `.s` instead of `.o`, +// which makes the test fail. So

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Fangrui Song via cfe-commits
@@ -3031,6 +3032,11 @@ defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf", "Perform ODR checks for decls in the global module fragment.">>, Group; +def gen_reduced_bmi : Flag<["-"], "fgen-reduced-bmi">, + Group, Visibility<[ClangOption,

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Paul Schwabauer via cfe-commits
koplas wrote: Do I miss something? The performance and file size is similar with and without `-fgen-reduced-bmi`. To reproduce clone https://github.com/koplas/clang-modules-test and run `build.sh` and `build_thin_bmi.sh`. https://github.com/llvm/llvm-project/pull/85050

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-15 Thread Paul Schwabauer via cfe-commits
koplas wrote: Using `-fgen-reduced-bmi` currently fails for me with a case that looks like this: ```C++ // a.hpp template void ignore(T const &) noexcept {} inline void resultCheck(char const *message) { ignore(message); } // b.cppm module; #include "a.hpp"

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From e5114cdc6a77711dda6a13cbee9cd5cc42be48c6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH] [C++20] [Modules] Introduce -fgen-reduced-bmi ---

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 converted_to_draft https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-driver Author: Chuanqi Xu (ChuanqiXu9) Changes This is the driver part of https://github.com/llvm/llvm-project/pull/75894. This patch introduces '-fgen-reduced-bmi' to enable generating the reduced BMI. This

[clang] [C++20] [Modules] Introduce -fgen-reduced-bmi (PR #85050)

2024-03-13 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/85050 This is the driver part of https://github.com/llvm/llvm-project/pull/75894. This patch introduces '-fgen-reduced-bmi' to enable generating the reduced BMI. This patch did: - When `-fgen-reduced-bmi` is