[clang] [serialization] no transitive decl change (PR #92083)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 12 17:21:13 PDT 2024


alexfh wrote:

So, what's happening here is a significant increase in the compilation time of a pretty large source that has a large number of modular dependencies (using Clang header modules rather than C++20 modules).

The times reported by `clang -ftime-report` for clang frontend change drastically:

before this commit:
```
===-------------------------------------------------------------------------===
                          Clang front-end time report
===-------------------------------------------------------------------------===
  Total Execution Time: 207.1765 seconds (218.7714 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  153.2751 ( 78.6%)   8.5109 ( 70.4%)  161.7860 ( 78.1%)  170.5710 ( 78.0%)  Clang front-end timer
  40.0169 ( 20.5%)   3.1469 ( 26.0%)  43.1638 ( 20.8%)  45.8168 ( 20.9%)  Reading modules
```

after this commit:
```
===-------------------------------------------------------------------------===
                          Clang front-end time report
===-------------------------------------------------------------------------===
  Total Execution Time: 1134.1241 seconds (1179.8429 wall clock)
                                                                                                                                                                                                                                                        ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  591.7280 ( 54.0%)  21.5861 ( 56.0%)  613.3141 ( 54.1%)  638.4518 ( 54.1%)  Clang front-end timer
  502.9522 ( 45.9%)  16.6865 ( 43.3%)  519.6387 ( 45.8%)  540.1083 ( 45.8%)  Reading modules
```

Given the notorious difficulty in preparing shareable test cases for modular compilations, I expect this to take days until we can give you something specific, but I'll ask @ilya-biryukov if he can spot something right away.

And I suspect that ARM is a red herring here. The problem seems to be purely in Clang frontend. Checking...

https://github.com/llvm/llvm-project/pull/92083


More information about the cfe-commits mailing list