Skip to content

Refactor iface file generation

Ömer Sinan Ağacan requested to merge wip/osa1/backend_refactoring into master

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.

This change is required by !1304 (merged) and !1530 (closed).

-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.

The code was written in parts by @osa1 and in parts by @AndreasK

Performance

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.

Edited by Andreas Klebinger

Merge request reports