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

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 26 20:35:57 PDT 2025


================
@@ -330,6 +325,18 @@ bool MachineFunction::shouldSplitStack() const {
   return getFunction().hasFnAttribute("split-stack");
 }
 
+Align MachineFunction::getPreferredAlignment() const {
+  Align PrefAlignment = Align(1);
----------------
MaskRay wrote:

Instead of reassigning to the variable multiple times, it's better to reverse the order the following two conditions

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


More information about the llvm-branch-commits mailing list