[llvm] [CodeGen] Don't allow function alignment less than the target's minimum (PR #90415)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 10:31:18 PDT 2024


efriedma-quic wrote:

> I could add "Fi32" to the AArch64 data layouts. (Any pointers to how to do this most cleanly?)

Should be Fn32. ("i" is only for targets where function pointers aren't simple pointers to code... like Arm and PPC.)

The datalayout is in two places: clang/lib/Basic/Targets/AArch64.cpp, and llvm/lib/Target/AArch64/AArch64TargetMachine.cpp .  Then, ideally, you update UpgradeDataLayoutString in llvm/lib/IR/AutoUpgrade.cpp so auto-upgraded IR inherits the right behavior.

> (newbie Q: Should I open a different PR or repurpose this one?)

In this case, I'd create a new PR because the new approach is so much different.

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


More information about the llvm-commits mailing list