[clang] [Driver,AArch64] Remove AArch32-specific -m[no-]unaligned-access (PR #85441)

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 18 10:37:03 PDT 2024


MaskRay wrote:

> If possible I would prefer to keep -m[no-]unaligned-access for AArch64.
> 
> The history of this option name derives from Arm's proprietary compiler [developer.arm.com/documentation/dui0472/m/Compiler-Command-line-Options/--unaligned-access----no-unaligned-access](https://developer.arm.com/documentation/dui0472/m/Compiler-Command-line-Options/--unaligned-access----no-unaligned-access) which has been carried forward for the LLVM based Arm Compiler [developer.arm.com/documentation/101754/0621/armclang-Reference/armclang-Command-line-Options/-munaligned-access---mno-unaligned-access?lang=en](https://developer.arm.com/documentation/101754/0621/armclang-Reference/armclang-Command-line-Options/-munaligned-access---mno-unaligned-access?lang=en)
> 
> Yes the proprietary compiler can always put this back as a downstream change. However we are trying to introduce more use of upstream clang and it would help migration of these projects if they didn't need to change.

Thanks for the comments. The first link gives `--unaligned_access, --no_unaligned_access`, which Clang doesn't support.
Does the second link mean AArch32 or AArch64?  I thinks there may be strong motivation to keep both `-m[no-]strict-align` (`-mno-strict-align` was a recent introduction by LoongArch folks) but very little for AArch64 (since GCC has always been rejecting `-m[no-]unaligned-access`).

Part of the motivation behind the change and https://github.com/llvm/llvm-project/pull/85350 is to discourage future ports (including existing RISC-V/LoongArch) to create aliases for architectures that don't need the aliases.



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


More information about the cfe-commits mailing list