<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/71034>71034</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [C++20] [Modules] Try to generate a reduced BMI to exclude the things not necessary in an interface
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:modules
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            ChuanqiXu9
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ChuanqiXu9
      </td>
    </tr>
</table>

<pre>
    According to https://isocpp.org/files/papers/P3033R0.html, when we change the body of a non-inline functions in a module purview, the generated BMI shouldn't change.

For example,

```C++
export module a;
export int a() {
    return 43;
}
```

If we change the implementation from `return 43;` to `return 44;` the generated BMI shouldn't change. This is pretty helpful to improve the user's experience by avoiding unnecessary rebuildings as much as possible.

This covers: https://github.com/llvm/llvm-project/issues/70569.

Note that the later discussion in SG15 reveals that the paper is not conflicting with 2 phase compilation. Since we can generate 2 BMIs. One for users and one for building self.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyklE1v4zYQhn8NdRmsQVFf1kEHJ4aLPWxbdHPolaJGJguKZPnhxP--oKzEcU4FFhAsYyjODN_34fAQ1NkgDqR5Iow9y8TNv-rv1BPGSHMseIrS-uEeL0Y7XYeDENZPypwhWpAxukCqA2Enwk4qWOHczvozYadZaQyEnRx36POfPytaVX_RnYyLJuwZXiUaeEUQkpszQpQIuQDYGTgYa74po5VBmJMRUVkTQBngsNgpaQSX_EXha06Ud57RoOcRJ3j68R2CtElPhrAubul3hB4JPdx-T9YDvvHFaSTs-fMKaenteSbsKT9rFN-c9fG9MifVY1yZCJywPWE9kG5bAwDwGJM3UFcfO0h3_FLoc_Xv8xc9VG5xQRN5FgBmbxcgLX3I29JsxKdo_R79P7LAi1QBVADnMcYrSNRuTjqnVIvz9nJrJAX0hHUB8M2hV2gEwngFfrFqRSEZgwJD4P4KHsekdA4H4AGWJGR-OxuCGvWjE2t1YS-ZkOrwBaezijKNO2EXwk5aX95f35y3_6CIK3EhrZR1tGn7h9S_25h753E9gOYRPUwqiBRC1lIZ-Plb2YDHC3Id7l-uvGZFjI0grJm1EjGf8VVFCQyc5AFB2MUpvdqyg58q65Gt4-ZDcmBZ87CDPzLD1q8aBuBmArtF3nWCgHp-aL6Yhmrqq54XOJRtv-9L2neskANiV3b1ntZ91VZs39Fm3I_lvp33OE7tOBdqYJRVZUkZ7WpW97uuF-0ep7os-4b1Eyc1xYUrvctS5rtarCIOXUmrutB8RB22kSA0N2dSHW7gh20u-GE1YUznQGqqVYjhniuqqNeJsl0gRklzBNI8_dhyNEd48dfM14dQHDxOSWyQRgv4JnSabuRFuYKUzbgjlgdBtjCin7nAInk9_AI7-eT_BQAA__-VQKAC">