Stabilize `-Cmin-function-alignment` by folkertdev · Pull Request #142824 · rust-lang/rust

@rustbot rustbot added A-LLVM

Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.

S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

labels

Jun 21, 2025

bjorn3

RalfJung

This was referenced

Jun 21, 2025

@ojeda ojeda mentioned this pull request

Jun 22, 2025

48 tasks

jhpratt added a commit to jhpratt/rust that referenced this pull request

Jun 22, 2025
…-alignment, r=workingjubilee

centralize `-Zmin-function-alignment` logic

tracking issue: rust-lang#82232
discussed in: rust-lang#142824 (comment)

Apply the `-Zmin-function-alignment` value to the alignment field of the function attributes when those are created, so that individual backends don't need to consider it.

The one exception right now is cranelift, because it can't yet set the alignment for individual functions, but it can (and does) set the global minimum function alignment.

cc `@RalfJung` I think this is an improvement regardless, is there anything else that should be done for miri?

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Jun 23, 2025
…-alignment, r=workingjubilee

centralize `-Zmin-function-alignment` logic

tracking issue: rust-lang#82232
discussed in: rust-lang#142824 (comment)

Apply the `-Zmin-function-alignment` value to the alignment field of the function attributes when those are created, so that individual backends don't need to consider it.

The one exception right now is cranelift, because it can't yet set the alignment for individual functions, but it can (and does) set the global minimum function alignment.

cc ``@RalfJung`` I think this is an improvement regardless, is there anything else that should be done for miri?

rust-timer added a commit that referenced this pull request

Jun 23, 2025
Rollup merge of #142854 - folkertdev:centralize-min-function-alignment, r=workingjubilee

centralize `-Zmin-function-alignment` logic

tracking issue: #82232
discussed in: #142824 (comment)

Apply the `-Zmin-function-alignment` value to the alignment field of the function attributes when those are created, so that individual backends don't need to consider it.

The one exception right now is cranelift, because it can't yet set the alignment for individual functions, but it can (and does) set the global minimum function alignment.

cc ``@RalfJung`` I think this is an improvement regardless, is there anything else that should be done for miri?
Higher alignments are not supported in COFF

@folkertdev

@Urgau Urgau mentioned this pull request

Jun 29, 2025

@traviscross traviscross added I-lang-radar

Items that are on lang's radar and will need eventual work or consideration.

and removed I-lang-nominated

Nominated for discussion during a lang team meeting.

P-lang-drag-3

Lang team prioritization drag level 3.https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang.

labels

Jul 2, 2025

@rustbot rustbot added S-blocked

Status: Blocked on something else such as an RFC or other implementation work.

and removed S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Sep 11, 2025