[PATCH] D149946: [LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

Peter Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 12:31:13 PDT 2023


peter.smith added a comment.

No objections for moving out m_arm_Features_Group or adding the alias. It looks like that is currently unused i.e. no driver filters out the m_arm_Features_Group. I can't comment on the LoongArch specific parts of the patch.

I think you may want to note in the help that the option is not universally supported. Perhaps add a test to show that it remains unused on a target that does not support it. For example for an x86_64 target:

  clang: warning: argument unused during compilation: '-munaligned-access' [-Wunused-command-line-argument]



================
Comment at: clang/include/clang/Driver/Options.td:3656
-def munaligned_access : Flag<["-"], "munaligned-access">, Group<m_arm_Features_Group>,
-  HelpText<"Allow memory accesses to be unaligned (AArch32/AArch64 only)">;
-def mno_unaligned_access : Flag<["-"], "mno-unaligned-access">, Group<m_arm_Features_Group>,
----------------
I think this is AArch32/AArch64/LoongArch only. I don't think this patch adds support for all other Targets.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149946/new/

https://reviews.llvm.org/D149946



More information about the cfe-commits mailing list