[all-commits] [llvm/llvm-project] 6d6bae: [X86] Support CFE flags for APX features (#74199)

Shengchen Kan via All-commits all-commits at lists.llvm.org
Mon Dec 4 03:23:10 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d6baef5c9bf880a28c3b9861fc5c1f578b6635c
      https://github.com/llvm/llvm-project/commit/6d6baef5c9bf880a28c3b9861fc5c1f578b6635c
  Author: Shengchen Kan <shengchen.kan at intel.com>
  Date:   2023-12-04 (Mon, 04 Dec 2023)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Basic/Targets/X86.cpp
    M clang/lib/Basic/Targets/X86.h
    M clang/lib/Driver/ToolChains/Arch/X86.cpp
    M clang/test/Driver/x86-target-features.c
    M clang/test/Preprocessor/x86_target_features.c
    M llvm/docs/ReleaseNotes.rst
    M llvm/include/llvm/TargetParser/X86TargetParser.def
    M llvm/lib/Target/X86/X86.td
    M llvm/lib/TargetParser/X86TargetParser.cpp

  Log Message:
  -----------
  [X86] Support CFE flags for APX features (#74199)

Positive options: -mapx-features=<comma-separated-features>
Negative options: -mno-apx-features=<comma-separated-features>

-m[no-]apx-features is designed to be able to control separate APX
features.

Besides, we also support the flag -m[no-]apxf, which can be used like an
alias of -m[no-]apx-features=< all APX features covered by CPUID APX_F>

Behaviour when positive and negative options are used together:

For boolean flags, the last one wins

-mapxf   -mno-apxf   -> -mno-apxf
-mno-apxf   -mapxf   -> -mapxf

For flags that take a set as arguments, it sets the mask by order of the
flags

-mapx-features=egpr,ndd  -mno-apx-features=egpr  ->   -egpr,+ndd
-mapx-features=egpr  -mno-apx-features=egpr,ndd  ->   -egpr,-ndd
-mno-apx-features=egpr  -mapx-features=egpr,ndd  ->   +egpr,+ndd
-mno-apx-features=egpr,ndd  -mapx-features=egpr  ->   -ndd,+egpr

The design is aligned with gcc
https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628905.html




More information about the All-commits mailing list