LLVM is not good at big functions, I have seen this before as well. One of the functions you are generating is almost 100,000 lines of Rust code including tons of internal control flow: starting here, repeated 300× in the definition of VANILLA_ID_MAP. You should reorganize define_blocks to break this one function up into 300 individual functions and it will compile in minutes.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Rust macro extremely slow and with high disk usage | 7 | 966 | September 29, 2023 | |
Unmanageable compile time with long / lots of generated code | 5 | 521 | January 11, 2025 | |
[Solved] 30 secs to compile 1200 lines of code?
|
8 | 1518 | January 12, 2023 | |
Long compile times for a vector with 50K u64 values | 18 | 1452 | March 19, 2020 | |
Compile time help
|
11 | 618 | March 5, 2024 |