Skip to content

Implement call graph querying #1027

@feds01

Description

@feds01

This issue relates to the compiler knowing about the call graph of the program. This will enable the following:

  • optimise out dead code, functions which are never called and don't need to be lowered/optimised/code-gened.
  • allow for a dead-code analysis reporting system.

This should be computed at some point during optimisations (or perhaps pre/mid optimisations) to rule out functions immediately from ever being lowered/optimised.

Additionally, it would nice if the compiler could emit a Graphviz represention of the program callgraph, via cmd args like: --show-call-graph (which is an lowering specific option - maybe it could be used in TIR too?)

Metadata

Metadata

Assignees

Labels

loweringRelated to the general lowering of AST into simpler AST and/or IRs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions