hashc icon indicating copy to clipboard operation
hashc copied to clipboard

Implement call graph querying

Open feds01 opened this issue 1 year ago • 0 comments

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?)

feds01 avatar Oct 18 '23 21:10 feds01