Dead code elimination (=DCE) for IC.
Types
AliveContext = object stack: seq[(int, TOptions, NodePos)] ## A stack for marking symbols as alive. decoder: PackedDecoder ## We need a PackedDecoder for module ID address translations. thisModule: int ## The module we're currently analysing for DCE. alive: AliveSyms ## The final result of our computation. options: TOptions compilerProcs: Table[string, (int, int32)]
- Purpose is to fill the 'alive' field. Source Edit
Procs
proc computeAliveSyms(g: PackedModuleGraph; conf: ConfigRef): AliveSyms {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect].}
- Entry point for our DCE algorithm. Source Edit