================
@@ -1982,7 +1982,7 @@ unsigned tools::ParseFunctionAlignment(const ToolChain 
&TC,
     return 0;
 
   if (A->getOption().matches(options::OPT_falign_functions))
-    return 0;
+    return 4; // log2(16)
----------------
MaskRay wrote:

I agree that clangDriver should not hard code a value like 16.

The relevant code is at `llvm/lib/CodeGen/MachineFunction.cpp`

```cpp
  // FIXME: Shouldn't use pref alignment if explicit alignment is set on F.
  // FIXME: Use Function::hasOptSize().
  if (!F.hasFnAttribute(Attribute::OptimizeForSize))
    Alignment = std::max(Alignment,
                         STI->getTargetLowering()->getPrefFunctionAlignment());
```

https://github.com/llvm/llvm-project/pull/101257
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to