aboutsummaryrefslogtreecommitdiff
path: root/clang/include
diff options
context:
space:
mode:
authorShengchen Kan <shengchen.kan@intel.com>2024-07-03 16:02:58 +0800
committerGitHub <noreply@github.com>2024-07-03 16:02:58 +0800
commit76c84e702bd9af7db2bb9373ba6de0508f1e57a9 (patch)
tree197fc869e2bc21c3b7f986e8b1d5e93fe099199e /clang/include
parentf3a02253e9daba0e5c11b94c090dfa9e2e9ad5db (diff)
downloadllvm-76c84e702bd9af7db2bb9373ba6de0508f1e57a9.zip
llvm-76c84e702bd9af7db2bb9373ba6de0508f1e57a9.tar.gz
llvm-76c84e702bd9af7db2bb9373ba6de0508f1e57a9.tar.bz2
[Driver][X86] Add flang visibility for -mapx-features= (#97525)
The default visibility of `m_x86_Features_Group` is `ClangOption, CLOption`. For x86, we expose `-march` to flang but not `-m<cpuid>`. `apxf` is special b/c it contains several independent features like `egpr, ndd, ppx, push2pop2, ccmp, nf, cf` and `zu`. Users may would like to turn on part of features in different cases 1. enable `ndd` only when writing a code-size sensitive library 2. disable `ccmp`, `cf` when building component has strong security request on caches Hence, we expose `-mapx-features=` to flang for Fortran users.
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Driver/Options.td4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 1c2b8cf..1ede75d 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -6319,9 +6319,9 @@ def mno_gather : Flag<["-"], "mno-gather">, Group<m_Group>,
def mno_scatter : Flag<["-"], "mno-scatter">, Group<m_Group>,
HelpText<"Disable generation of scatter instructions in auto-vectorization(x86 only)">;
def mapx_features_EQ : CommaJoined<["-"], "mapx-features=">, Group<m_x86_Features_Group>,
- HelpText<"Enable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">;
+ HelpText<"Enable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">, Visibility<[ClangOption, CLOption, FlangOption]>;
def mno_apx_features_EQ : CommaJoined<["-"], "mno-apx-features=">, Group<m_x86_Features_Group>,
- HelpText<"Disable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">;
+ HelpText<"Disable features of APX">, Values<"egpr,push2pop2,ppx,ndd,ccmp,nf,cf,zu">, Visibility<[ClangOption, CLOption, FlangOption]>;
// For stability, we only add a feature to -mapxf after it passes the validation of llvm-test-suite && cpu2017 on Intel SDE.
def mapxf : Flag<["-"], "mapxf">, Alias<mapx_features_EQ>, AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf"]>;
def mno_apxf : Flag<["-"], "mno-apxf">, Alias<mno_apx_features_EQ>, AliasArgs<["egpr","push2pop2","ppx","ndd","ccmp","nf","cf"]>;