Skip to content

Remove stripping of minsize attribute for functions with 256-bit integer division#501

Merged
elle-j merged 2 commits into
mainfrom
lj/remove-strip-minsize
Apr 9, 2026
Merged

Remove stripping of minsize attribute for functions with 256-bit integer division#501
elle-j merged 2 commits into
mainfrom
lj/remove-strip-minsize

Conversation

@elle-j
Copy link
Copy Markdown
Contributor

@elle-j elle-j commented Apr 9, 2026

Description

We previously had a workaround to strip minsize attributes for functions with 256-bit integer division due to a crash in the LLVM backend. We now patch LLVM with the fix, allowing us to use minsize with correct backend optimization, making the workaround unnecessary.

Will use patched LLVM release.
@elle-j elle-j requested a review from kvpanch April 9, 2026 16:11
@elle-j elle-j marked this pull request as ready for review April 9, 2026 18:53
@elle-j elle-j changed the title [DON'T MERGE] Remove stripping of minsize attribute for functions with 256-bit integer division Remove stripping of minsize attribute for functions with 256-bit integer division Apr 9, 2026
@elle-j elle-j merged commit 41d8593 into main Apr 9, 2026
16 checks passed
@elle-j elle-j deleted the lj/remove-strip-minsize branch May 6, 2026 07:08
xermicus added a commit that referenced this pull request May 21, 2026
Resolves conflicts after LLVM 21 → 22 upgrade and inkwell 0.8 → 0.9
landed on main:

* Cargo.toml: keep bumped versions from main; preserve revive-newyork.
* docs/: regenerated with mdbook against cl/newyork sources.
* function/mod.rs: keep ours' NoFree+NoUnwind PVM target attributes;
  keep main's is_middle_end_enabled gate around NoInline/OptimizeNone.
* context/mod.rs: drop narrow_divrem_instructions and
  strip_minsize_for_divrem — both were LLVM 21 backend workarounds
  removed by main in #501 once the upstream patch landed; LLVM 22
  bundles the fix.
* heap.rs: port inkwell 0.8 → 0.9 API breaks (custom_width_int_type
  now takes NonZeroU32 and returns Result).
* codesize.json: kept ours (LLVM 22 bumps integration sizes ~5–60%;
  update intentionally in a follow-up).

Verified: RESOLC_USE_NEWYORK=1 make test green (workspace + book).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

2 participants