You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plan aims to reduce the algorithmic cost of LLVM analyses by sharing traversals and intermediate artifacts, without changing the semantics of diagnostics. The approach prioritizes a pipeline engine with requires/provides dependencies, then a shared fact collector to reduce redundant traversals.
Decisions
Primary objective: reduction of real time (wall-clock).
Delivery strategy: migration in 2 phases.
Analysis selection: review module by module in phase 1 to classify subscriber-compatible vs independent (dataflow/fixpoint).
Scope
In
Evolution of analysis architecture (orchestration of modules, sharing of data between analyses, cache of derived artifacts, performance/functional validation).
Out
Change of diagnostic business rules
Modification of test files
Complete migration of all analyses in a single iteration
Action items
Phase 1 - Establish the target real performance baseline (timing + xctrace) and define primary/secondary KPIs (real priority, user/sys in support).
Phase 1 - Add technical instrumentation of traversals (Module/Function/Instruction counters per analysis) to measure redundancy level before refactoring.
Phase 1 - Review each analysis to classify: subscriber-compatible vs independent (dataflow/fixpoint).
Phase 1 - Refactor AnalysisPipeline towards a requires/provides model to explicitly declare dependencies between analyses.
Phase 1 - Introduce a minimal skeleton AnalysisArtifactStore type-safe (API + invalidation by module/config), without freezing all artifacts.
Phase 1 - Add an IRFactCollector as the first pass of the pipeline (unique traversal Module/Function/BB/Instruction) exposing shared IRFacts.
Phase 2 - Introduce a subscriber mechanism (Observer) for analyses classified as subscriber-compatible.
Phase 2 - First migrate pilot analyses to shared facts (priority: StackBuffer, ResourceLifetime, Uninitialized; additional candidates: IntegerOverflow, GlobalReadBeforeWrite) and measure incremental gain on real time.
Phase 2 - Extend PreparedModule/cache with stable derivable artifacts (debug index, symbol maps, type facts) with versioned key.
Description
This plan aims to reduce the algorithmic cost of LLVM analyses by sharing traversals and intermediate artifacts, without changing the semantics of diagnostics. The approach prioritizes a pipeline engine with requires/provides dependencies, then a shared fact collector to reduce redundant traversals.
Decisions
Scope
In
Out
Action items