Implements the various MIR-based passes. The entry point is the applyPasses procedure.
Imports
-
../ast/ast_query, ../ast/ast_types, ../ast/lineinfos, ../ast/types, ../front/in_options, analysis, datatables, mirbodies, mirenv, mirchangesets, mirconstr, mirtrees, mirtypes, rtchecks, sourcemaps, ../modules/modulegraphs, ../modules/magicsys, ../sem/aliasanalysis, ../sem/mirexec, ../utils/idioms, ../backend/ccgutils, ../sem/aliases, ../front/options
Types
TargetBackend = enum targetC, targetJs, targetVm
- The backend that is going to consume the MIR code. Used to select what passes to run. Source Edit
Procs
proc applyPasses(body: var MirBody; prc: PSym; env: var MirEnv; graph: ModuleGraph; target: TargetBackend) {. ...raises: [Exception, ERecoverableError, KeyError], tags: [RootEffect, ReadDirEffect].}
- Applies all applicable MIR passes to the body (tree and source) of prc. target is the targeted backend and is used to enable/disable certain passes. Passes may register new entities with env. Source Edit