[all-commits] [llvm/llvm-project] 2cf143: [AArch64] Decouple feature dependency expansion. (...

Alexandros Lamprineas via All-commits all-commits at lists.llvm.org
Mon Jun 10 05:53:36 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2cf14398c9341feddb419e7ff9c8c5623a3da3db
      https://github.com/llvm/llvm-project/commit/2cf14398c9341feddb419e7ff9c8c5623a3da3db
  Author: Alexandros Lamprineas <alexandros.lamprineas at arm.com>
  Date:   2024-06-10 (Mon, 10 Jun 2024)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/Basic/Targets/AArch64.cpp
    M clang/lib/Basic/Targets/AArch64.h
    M clang/test/CodeGen/aarch64-cpu-supports-target.c
    M clang/test/CodeGen/aarch64-sme-intrinsics/aarch64-sme-attrs.cpp
    M clang/test/CodeGen/aarch64-targetattr.c
    M clang/test/CodeGen/attr-target-version.c
    M clang/test/Sema/aarch64-neon-target.c
    M llvm/include/llvm/TargetParser/AArch64TargetParser.h
    M llvm/lib/TargetParser/AArch64TargetParser.cpp

  Log Message:
  -----------
  [AArch64] Decouple feature dependency expansion. (#94279)

The dependency expansion step which was introduced by FMV has been
erroneously used for non-FMV features, for example when parsing the
target attribute. The PR #93695 has rectified most of the tests which
were relying on dependency expansion of target features specified on the
-cc1 command line. In this patch I am decoupling the dependency
expansion of features specified on the target attribute from FMV.

To do that first I am expanding FMV dependencies before passing the list
of target features to initFeatureMap(). Similarly when parsing the
target attribute I am reconstructing an ExtensionSet from the list of
target features which was created during the command line option
parsing. The attribute parsing may toggle bits of that ExtensionSet and
at the end it is converted to a list of target features. Those are
passed to initFeatureMap(), which no longer requires an override.

A side effect of this refactoring is that features specified on the
target_version attribute now supersede the command line options, which
is what should be happening in the first place.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list