[PATCH] D38479: Make -mgeneral-regs-only more like GCC's

George Burgess IV via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 18 10:33:54 PDT 2017


george.burgess.iv updated this revision to Diff 119499.
george.burgess.iv marked 2 inline comments as done.
george.burgess.iv added a comment.

Addressed feedback. Thanks!

After looking around and internalizing a little bit of how backends in LLVM work, the path forward I have in mind is to basically funnel another bit to the backend that indicates whether the user specified `-mgeneral-regs-only`. If so, that flag will act like `"-crypto,-fp-armv8,-neon"` when we're setting up the AArch64 backend (e.g. floats/vectors will still be illegal, vector regclasses won't be added, ...). Importantly, this approach wouldn't actually remove the aforementioned feature flags, so I think it'll allow our assembler to handle non-general ops without any extra effort. We can also query this bit to see if we want to diagnose calls where the ABI mandates that vector regs are used. Thoughts welcome :)


https://reviews.llvm.org/D38479

Files:
  docs/UsersManual.rst
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Basic/LangOptions.def
  include/clang/Driver/CC1Options.td
  include/clang/Sema/Sema.h
  lib/Driver/ToolChains/Arch/AArch64.cpp
  lib/Driver/ToolChains/Clang.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaExprCXX.cpp
  test/CodeGen/aarch64-mgeneral_regs_only.c
  test/Driver/aarch64-mgeneral_regs_only.c
  test/Sema/aarch64-mgeneral_regs_only.c
  test/SemaCXX/aarch64-mgeneral_regs_only.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38479.119499.patch
Type: text/x-patch
Size: 33207 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171018/23bf4497/attachment-0001.bin>


More information about the cfe-commits mailing list