[PATCH] D157680: [X86]Support options -mno-gather -mno-scatter

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 11 07:02:15 PDT 2023


MaskRay added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:903-906
+def mno_gather : Flag<["-"], "mno-gather">, Flags<[NoXarchOption]>,
+                 HelpText<"Disable generation of gather instructions in auto-vectorization(x86 only)">;
+def mno_scatter : Flag<["-"], "mno-scatter">, Flags<[NoXarchOption]>,
+                  HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">;
----------------
pengfei wrote:
> Move under "// X86 feature flags"
Also remove `NoXarchOption`

https://maskray.me/blog/2021-03-28-compiler-driver-and-cross-compilation#misc

If an option has the NoXarchOption flag, ClangDriver will emit an error if the option is used after -Xarch_* (originally for universal macOS binary, reused by offloading purposes -Xarch_host/etc). The error checking only applies to a small set of options (e.g. -o) and is not very useful for most options, but NoXarchOption was improperly named DriverOption (commit aabb0b11a3c1d8a6bb859db80400cffdcc9b336f) and lured some contributors to add NoXarchOption to options that should not have the flag.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157680



More information about the cfe-commits mailing list