Skip to content

SSA Coverage Matrix ​

Status: alpha infrastructure with oracle-first expansion.

This page records the current SSA route as implemented in UniversalToolchain.Ssa.*. It is a coverage contract, not a promise that SSA is the default optimizer/backend layer.

Current Route ​

AreaStatusEvidence
Public Wist opt-inSupportedWistEngineOptions.Optimization.Ssa and facade end-to-end tests
PoliciesDisabled, Prefer, Require, DebugSsaRoundtripRouteTests; only known unsupported diagnostics may fall back under Prefer
ObservabilitySupportedWistOptimizationReport exposes route, fallback, profile, counts, passes, stage-qualified diagnostics, and trace
Route report state invariantsEnforcedimpossible success/fallback/policy/count combinations are rejected by SsaRouteReportInvariantTests
AIR artifact inputSupported for AirArtifact onlyAirToSsaConverter.Run rejects non-AIR artifacts
AIR/SSA/AIR verificationSupportedstructural verifiers run before lowering, after lowering/passes, and after emission
External parameter valuesSupported for current typed subsetAIR external-value references lower to SSA parameters
Push bool/int/doubleSupportedcanonical SSA constants
DropSupported with deterministic underflow diagnosticsair.to-ssa.stack-underflow
Native Wist int32 add/subtract/multiplySupported and optimizableWistNativeArithmeticSsaProjection maps to canonical callable IDs
Registered AIR intrinsicsSupported for registered descriptorsdescriptor-driven lowering tests
Managed static/instance/constructor callsSupported for mapped CLR typesexact execution-scoped binding set, no production rediscovery
Duplicate equivalent managed bindingsSupportedstructural binding equivalence regression
Conflicting/missing bindingsRejecteddeterministic lowering/emission diagnostics
Branch terminators and block argumentsAlpha-supportedCFG, dominance, block-argument, and route tests
Zero or one return valueSupportedmulti-return is explicitly rejected
SSA to AIR emissionSupported for current legal stack-schedulable subsetSsaToAirConverter tests
Constant foldingSupported for trusted deterministic descriptorsSsaConstantFoldingPass tests
SCCP-liteSupportedblock-argument constant propagation tests
Local common-subexpression eliminationExplicit SSA pass only; gated from the preview AIR roundtrip until repeated-value scheduling is supportedlocal CSE safety, substitution, and profile-gate regressions
Branch/unreachable cleanupSupportedbranch folding and cleanup tests
Dead pure instruction eliminationSupportedeffect-aware elimination tests
Extension-pack/pass conflictsFail-fastroute profile construction tests

Stable Unsupported-Shape Diagnostics ​

The route rejects unsupported shapes with explicit codes rather than guessing:

  • air.to-ssa.stack-underflow — an instruction consumes more values than the analyzed AIR stack contains;
  • air.to-ssa.return-arity — more than one return value is requested;
  • air.to-ssa.return-type — return paths disagree on the current supported result type;
  • air.to-ssa.push-type — a pushed CLR/runtime value type has no current SSA mapping;
  • air.to-ssa.opcode — the AIR opcode is outside the registered lowering surface;
  • air.to-ssa.managed-call.projection.unregistered — a projection selected a callable with no active semantic descriptor;
  • ssa.optimization.managed-call.binding.missing and ssa.to-air.managed-call.binding.missing — a managed callable lost its execution-scoped binding;
  • ssa.to-air.value-reuse.unsupported — legal SSA requires a duplicated or spilled stack value, but the minimal AIR emitter has no repeated-value scheduling strategy.

Route diagnostics preserve their canonical stage (lowering, optimization, emission, or route) through the low-level report and the public Wist optimization report. Public failure diagnostics project those values as SSA Lowering, SSA Optimization, SSA Emission, or SSA Route.

Under Prefer, only explicitly classified unsupported-shape diagnostics may trigger a controlled AIR fallback. Require and Debug preserve the route report and fail instead of silently changing execution strategy.

Not Production-Ready Yet ​

GapRequired next gate
Complete AIR intrinsic coverageDifferential tests per intrinsic family
Full runtime value type mappingType mapping table and verifier tests
Multi-return SSA shapesExplicit function signature model and AIR lowering policy
Arbitrary SSA schedulingAdd duplication/spill scheduling, then relax the explicit repeated-value preflight diagnostic with differential emission tests
SSA-native backendSeparate backend contract or proven AIR-lowering contract
Broader optimizer suite (cross-block GVN, LICM, inlining)Required/preserved/invalidated facts and differential tests per pass

Expansion Rule ​

Do not add broad SSA conversion or optimization support before adding oracle coverage:

  1. Add a focused unsupported-shape or differential test.
  2. Add the matrix row or update the status.
  3. Implement conversion or optimization.
  4. Verify AIR route and AIR -> SSA -> AIR route produce equivalent observable behavior for the supported case.

Public developer manual. Internal reviews, proposals and maintainer material live under internal-docs/.