Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b1bd3de969
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da0d657cd9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR introduces a CFG-aware “full” inliner alongside the existing trivial (single-block) inliner, adds inline-related function attributes, and wires the new inliner behavior into optimization pipeline presets with expanded test coverage and updated snapshots.
Changes:
- Add
NOINLINE/ALWAYSINLINE/INLINEHINTfunction attributes and aFuncStore::restorehelper to support safe remove/restore patterns during inlining. - Implement a new module-level inliner driver that combines trivial inlining with constrained multi-block (“full”) inlining, including operand rewriting and cost/budget decisions.
- Add extensive full-inliner tests + fixtures and update snapshot outputs/pipeline preset behavior.
Reviewed changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/ir/src/module.rs | Adds new inline-related FuncAttrs flags and FuncStore::restore() used by the full inliner. |
| crates/codegen/src/optim/inliner/mod.rs | New inliner orchestrator combining trivial + full inlining with budgets/ordering and stats. |
| crates/codegen/src/optim/inliner/full.rs | Implements full (multi-block) callsite inlining with CFG edits, phi handling, and validation. |
| crates/codegen/src/optim/inliner/cost.rs | Adds inline decision logic (attrs, SCC recursion, budgets, score model). |
| crates/codegen/src/optim/inliner/rewrite.rs | Operand rewriting utilities for cloned instructions and phi forward-ref fixups. |
| crates/codegen/src/optim/inliner/trivial.rs | Refactors trivial inliner to be a subcomponent (plans/materialization/application helpers). |
| crates/codegen/src/optim/pipeline.rs | Updates balanced/aggressive presets to enable constrained full inlining; adds preset tests. |
| crates/codegen/tests/inliner.rs | Adds “full inliner” fixture suite + targeted unit tests (verification, budgets, attrs, ordering). |
| crates/codegen/test_files/inliner_full/* | New full-inliner fixtures and snapshots. |
| crates/codegen/test_files/**.snap | Snapshot updates reflecting new inlining/pipeline behavior. |
Comments suppressed due to low confidence (2)
crates/codegen/tests/inliner.rs:16
- The
#[dir_test(...)]attribute is missing a comma afterglob: "*.sntn", which will make this test file fail to compile. Add the trailing comma between theglobandloaderentries (same pattern as otherdir_testuses).
#[dir_test(
dir: "$CARGO_MANIFEST_DIR/test_files/inliner/",
glob: "*.sntn"
loader: common::parse_module,
)]
crates/codegen/src/optim/inliner/trivial.rs:3
- The new module doc comment says the trivial inliner does “no CFG surgery”, but this module can splice a single-block terminator (see
InlinePlanSummary::SpliceSingleBlockTerminatorandsummary_changes_cfg), which can change CFG reachability. Please update the wording to match the actual behavior (e.g., “no multi-block CFG cloning” or explicitly mention terminator splicing).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 31 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 54a19d51b2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
43a7463 to
a0a8ded
Compare
No description provided.