This commit refactors interface file generation to allow information from the later passed (NCG, STG) to be stored in interface files.
We achieve this by splitting interface file generation into two parts:
- Partial interfaces, built based on the result of the core pipeline
- A fully instantiated interface, which also contains the final fingerprints and can optionally contain information produced by the backend.
-dynamic-too handling is refactored too: previously when generating code we'd branch on -dynamic-too before code generation, but now we do it after.
This actually improves performance overall.
We avoid some thunk leaks in toIface which overall turns out to outweigh any added work performed by the compiler.
Peak residency is unchanged.
Residency during running of the backend is about the same even though we keep the iface alive.
This is the case since most of the iface was kept alive by the EPS already.