Skip to content

Add a pass to reorder functions in pre-order of the call graph.#1203

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_901743552
Apr 24, 2026
Merged

Add a pass to reorder functions in pre-order of the call graph.#1203
copybara-service[bot] merged 1 commit intomainfrom
test_901743552

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service Bot commented Apr 18, 2026

Add a pass to reorder functions in pre-order of the call graph.

This change introduces a new pass to reorder the functions within an MLIR module. The functions are arranged such that callers appear before their callees, following a pre-order traversal of the call graph.

This ordering keeps the initial population of the worklist the same on the greedy rewriter driver during the propagation between inlined (named computations) and non-inlined (func/calls).

@copybara-service copybara-service Bot force-pushed the test_901743552 branch 2 times, most recently from fd5cc6b to a6b9848 Compare April 24, 2026 12:36
This change introduces a new pass to reorder the functions within an MLIR module. The functions are arranged such that callers appear before their callees, following a pre-order traversal of the call graph.

This ordering keeps the initial population of the worklist the same on the greedy rewriter driver during the propagation between inlined (named computations) and non-inlined (func/calls).

PiperOrigin-RevId: 904986100
@copybara-service copybara-service Bot merged commit cdbc78a into main Apr 24, 2026
@copybara-service copybara-service Bot deleted the test_901743552 branch April 24, 2026 13:07
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