Skip to content

docs(ci): attribute the native_owned_typed_views control_flow misses to #8457 - #8854

Merged
proggeramlug merged 1 commit into
mainfrom
fix/8489-attribution
Aug 26, 2026
Merged

docs(ci): attribute the native_owned_typed_views control_flow misses to #8457#8854
proggeramlug merged 1 commit into
mainfrom
fix/8489-attribution

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Records the attribution for #8489 and corrects three claims in the existing rationale that were all false. Comment and changelog only — allowed_missed_reason_kinds is unchanged (#8490 already widened it on 2026-08-20; the release was never actually blocked after that).

Attribution: 40e2ce86d (#8457, "make -Os the default native optimization level")

Found from CI job history rather than guessed: the native-ABI step was green at 526e0b502 (Aug 20 03:31) and red at 40e2ce86d (07:28). That window holds exactly two commits, and the other (f14a9e262, #8418) measures clean.

commit control_flow observed
526e0b502 (parent of window) 0 call 1, generic 2, unknown 1
f14a9e262 (#8418) 0 identical
40e2ce86d (#8457) 3 call 4, cf 3, generic 8, unknown 1

40e2ce86d's counts match CI's Linux numbers (call 4, cf 3, unknown 1) exactly.

Verdict: legitimate, not a codegen regression

Perry's emitted IR is byte-identical across the flip — same sha256 at 526e0b502, f14a9e262 and 40e2ce86d. Codegen output did not change at all. What changed is the clang args:

526e0b502: analysis_clang_args = ['-O3', ...]   + -mllvm -inlinehint-threshold=850
40e2ce86d: analysis_clang_args = ['-Os', ...]

The harness's remark pass reuses the compile's own args (_analysis_args_from_metadata), so the analysis moved to -Os too. At -Os LLVM declines the SimplifyCFG speculation and if-conversion that at -O3 flattened those branches into selects before the vectorizer ran — so the loops genuinely carry control flow it cannot if-convert, and vectorizing them would grow code size, which is exactly what -Os asks it not to do. -Os cost nothing measurable: vectorized_buffer_transform still vectorizes 2 loops against a floor of 1.

So the widening in #8490 was the right call. This PR only replaces its rationale, which recorded three now-falsified claims and no cause.

The three corrections

  1. Not Linux-only. The gate builds with cargo build -p perry--perry target/debug/perry (test.yml:1809, :1821) — a debug build. The macOS attempt that "did not reproduce" used --profile perry-dev (opt-level 1), a different profile, not a different OS. It reproduces on macOS with a CI-matching debug build.
  2. Not release-configuration-specific, for the same reason.
  3. Not the string-codegen work. control_flow=3 already at 5876c9cdd, which precedes refactor(stdlib): centralize string header readers #8448/perf(codegen): fuse String.concat arguments into concat chain #8450/fix(ui): replace borrowed runtime strings with owned copies #8453/perf(codegen): append strings through variable cells #8454. And 40e2ce86d is an ancestor of the 3627657c7 attribution baseline — which is precisely why that baseline looked "pre-existing" and made the original attribution circular.

Validation

  • all 30 lint-job gates pass
  • benchmarks/compiler_output/workloads.toml parses; allowed_missed_reason_kinds byte-for-byte unchanged
  • no version bump; no code change

Summary by CodeRabbit

  • Documentation
    • Clarified vectorization notes to explain reproducible control-flow misses across platforms and build configurations.
    • Corrected the changelog to attribute the behavior to optimization-level changes.
    • Added historical context and clarified that the documented expectations help detect future changes.

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1d027b6a-8ef0-4e54-b4db-b2c14078af64

📥 Commits

Reviewing files that changed from the base of the PR and between d9d39a6 and 7286205.

📒 Files selected for processing (2)
  • benchmarks/compiler_output/workloads.toml
  • changelog.d/8490-vectorization-allow-control-flow.md

📝 Walkthrough

Walkthrough

The change corrects documentation for three control_flow vectorization misses. It attributes them to LLVM behavior under -Os, records cross-platform reproducibility, and notes that the behavior predates related string-codegen changes.

Changes

Vectorization documentation

Layer / File(s) Summary
Document vectorization cause and scope
benchmarks/compiler_output/workloads.toml, changelog.d/8490-vectorization-allow-control-flow.md
The comments and changelog now describe the -Os cause, cross-platform reproducibility, unchanged emitted IR, and relevant change history.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: jdalton

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/8489-attribution

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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