[llvm-branch-commits] CodeGen: Emit .prefalign directives based on the prefalign attribute. (PR #155529)

Peter Collingbourne via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 26 17:13:01 PDT 2025


https://github.com/pcc created https://github.com/llvm/llvm-project/pull/155529

MachineFunction can now be queried for the preferred alignment which
comes from the function attributes (optsize, minsize, prefalign) and
TargetLowering. The result of this query is emitted as a .prefalign
directive if supported, otherwise it gets combined into the minimum
alignment.

Part of this RFC:
https://discourse.llvm.org/t/rfc-enhancing-function-alignment-attributes/88019





More information about the llvm-branch-commits mailing list