csharp
public static class CallGraphWhich functions an entry point can actually reach. Every backend needs this: a translation unit is one stage, so emitting another stage's functions would be dead code — and dead code that refers to the wrong stage's built-ins.
No guide page documents this yet — the page shows what the code says about itself.
Methods (3)
public static IEnumerable<IrFunction> Calls(IrStatement statement)The functions called anywhere inside a statement, nested ones included.
public static HashSet<IrFunction> Reachable(IrFunction entry)Everything reachable from an entry point, itself included.
public static IReadOnlyList<IrFunction> InCallOrder(IrFunction entry)Reachable functions with every callee before its callers. Targets that cannot forward-reference a function need this; the language has no recursion, but the visited set keeps a cycle from looping forever.
Used by (8)
- CompiledLibraryTestsVixen.Raven.Tests
- GlslEmitterVixen.Raven
- ImportPrunerVixen.Raven
- IrCapabilitiesVixen.Raven
- LibraryBuilderVixen.Raven
- LowererVixen.Raven
- SpirvEmitterVixen.Raven
- StreamTestsVixen.Raven.Tests