Skip to main content

Module scheduling

Module scheduling 

Source
Expand description

Pass-pipeline scheduling engine — orchestrates SsaPass execution across methods with capability-based layering, fixpoint iteration, and parallel dispatch.

§Architecture

The scheduler organizes passes into execution layers computed from their declared capabilities. Passes that provide a capability are placed before passes that require it, ensuring producers run before consumers.

§Usage

Hosts implement SsaPassHost<T> on their context type (which bundles World<T>, SsaStore<T>, and DirtySet<T>), register passes with a PassScheduler, and call PassScheduler::run_pipeline.

§Features

  • Capability-based ordering: passes declare provides/requires; the scheduler topologically sorts them into layers.
  • Fixpoint iteration: each layer runs to convergence with normalize passes (DCE, GVN) interleaved between iterations.
  • Parallel dispatch: per-method pass execution via rayon.
  • Modification-scope-driven repair: after each pass, the scheduler applies the minimum SSA repair needed (uses-only, instructions-only, or full rebuild) based on the pass’s declared ModificationScope.
  • Dirty tracking: only methods that may have changed are re-processed on subsequent iterations, unless a pass declares requires_full_scan.

Modules§

capability 🔒
Shared deobfuscation capability vocabulary used for pass ordering.
pass 🔒
SsaPass trait and supporting types (ModificationScope, SsaPassHost) for declaring and implementing SSA transformation passes.
scheduler 🔒
PassScheduler — the core engine that orchestrates SsaPass execution across methods.

Structs§

PassScheduler
Orchestrates SSA pass execution using capability-based scheduling.

Enums§

DeobfuscationCapability
Capability milestone produced or consumed by a deobfuscation pass.
ModificationScope
Describes the extent of modifications a pass makes to the SSA function.

Traits§

SsaPass
An SSA transformation pass.
SsaPassHost
Combined host surface that the scheduler exposes to passes.