Skip to content

Conversation

@copybara-service
Copy link

Add OptimizationContext to analysis passes and visitors.

This change modifies several analysis and pass implementations to accept and utilize an OptimizationContext. This allows them to leverage pre-computed topological sorts from the context, avoiding redundant computations.

Specifically:

  • DataflowVisitor and BitProvenanceAnalysis are updated to use OptimizationContext for topological sorts.
  • PredicateDominatorAnalysis is updated to use OptimizationContext for reverse topological sorts.
  • DataflowSimplificationPass and SelectSimplificationPass now pass the OptimizationContext to the analyses they use.
  • Benchmarks for PredicateDominatorAnalysis are updated to test with and without sharing the OptimizationContext.

@copybara-service copybara-service bot force-pushed the test_861883547 branch 6 times, most recently from 6520e1d to 0988b2b Compare January 28, 2026 18:36
This change modifies several analysis and pass implementations to accept and utilize an OptimizationContext. This allows them to leverage pre-computed topological sorts from the context, avoiding redundant computations.

Specifically:
-   DataflowVisitor and BitProvenanceAnalysis are updated to use `OptimizationContext` for topological sorts.
-   PredicateDominatorAnalysis is updated to use `OptimizationContext` for reverse topological sorts.
-   DataflowSimplificationPass and SelectSimplificationPass now pass the `OptimizationContext` to the analyses they use.
-   Benchmarks for PredicateDominatorAnalysis are updated to test with and without sharing the `OptimizationContext`.
PiperOrigin-RevId: 862315781
@copybara-service copybara-service bot merged commit 5da1ec3 into main Jan 28, 2026
@copybara-service copybara-service bot deleted the test_861883547 branch January 28, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant