WIP: Implement #17004 - Export LFInfo.
Expose codegens view of exported ids in interface files.
The code generator collectes certain information about all ids inside LambdaFormInformation.
This includes but is not limited to weither an id is:
- A constructor and which.
- A thunk
- A function and it's arity.
This has a few effects:
- We can avoid redundant slow calls by always knowing the arity of ids.
- We can avoid entering constructors since we can always infer their tag.
This can have quite an extreme effect on thight loops, for example the CS benchmark showed 80% less allocations and 70% less instructions executed. Since it is just a tight loop which happens to benefit from this change.
In general the effects are smaller, averaging a reduction of ~1% of instructions executed for nofib.
Implementation wise we collect the information during the execution of codeGen and push back interface file generation when required in order to include the generated information.
This is WIP still things left to do:
- Cache LFInformation across modules.
- Rebase and check CI/Testsuite.
- Add test cases.
- Check compiler performance.
- Write Notes detailing the changes.
- Base on !1633 (closed) once it's merged.