[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-07-01 Thread weiwei chen via cfe-commits
weiweichen wrote: > Thank you for the example, I understand what is happening how. > > * Before [[AArch64] Decouple feature dependency expansion.  > #94279](https://github.com/llvm/llvm-project/pull/94279), we used to add CPU > features in `AArch64::initFeatureMap`. > * In [[AArch64] Decouple f

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-07-01 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: Thank you for the example, I understand what is happening how. - Before #94279, we used to add CPU features in `AArch64::initFeatureMap`. - In #94279, we decided that actually you should do that in the Driver, which should put all `-target-features` it wants on the -cc1 com

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-30 Thread weiwei chen via cfe-commits
weiweichen wrote: Here is a self contained simple repro test cpp file: ``` #include "clang/Basic/Diagnostic.h" #include "clang/Basic/DiagnosticIDs.h" #include "clang/Basic/DiagnosticOptions.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/SmallString.h" #include "llvm/TargetParser/Host

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-27 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: I think a test demonstrating the problem would be the fastest way forward. https://github.com/llvm/llvm-project/pull/96832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-27 Thread weiwei chen via cfe-commits
weiweichen wrote: > The only thing `AArch64TargetInfo::initFeatureMap` adds is features from the > selected CPU. IMHO this was not an appropriate place to be doing that. Since > #94279 the CPU features are added either by > `AArch64TargetInfo::parseTargetAttr` when dealing with > `__attribute

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-27 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: The only thing `AArch64TargetInfo::initFeatureMap` adds is features from the selected CPU. IMHO this was not an appropriate place to be doing that. Since #94279 the CPU features are added either by `AArch64TargetInfo::parseTargetAttr` when dealing with `__attribute(target

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-27 Thread weiwei chen via cfe-commits
weiweichen wrote: > Could you explain more about what broke? Are you using target(..) attributes? `TargetInfo::CreateTargetInfo` is giving up back empty `opt->featureMap` for `AArch64`. But before the [PR mentioned](https://github.com/llvm/llvm-project/pull/94279), we can get a list of featur

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-27 Thread weiwei chen via cfe-commits
weiweichen wrote: > Could you explain more about what broke? Are you using target(..) attributes? `TargetInfo::CreateTargetInfo` is giving up back empty `opt->featureMap` for `AArch64` while before the mentioned PR, we can get a list of features. Is there a different way to get them back? htt

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-27 Thread Tomas Matheson via cfe-commits
tmatheson-arm wrote: And please add a test to cover whatever broke. https://github.com/llvm/llvm-project/pull/96832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread David Green via cfe-commits
davemgreen wrote: Could you explain more about what broke? Are you using target(..) attributes? https://github.com/llvm/llvm-project/pull/96832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread William G Hatch via cfe-commits
willghatch wrote: @labrinea please take a look. The [PR mentioned](https://github.com/llvm/llvm-project/pull/94279) above removed this code and broke AArch64 feature detection for us. https://github.com/llvm/llvm-project/pull/96832 ___ cfe-commits m

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread weiwei chen via cfe-commits
weiweichen wrote: Not sure if this is the right fix, so any clang experts here, please take a look to see if this is acceptable? https://github.com/llvm/llvm-project/pull/96832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread weiwei chen via cfe-commits
weiweichen wrote: @willghatch 👀 https://github.com/llvm/llvm-project/pull/96832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread weiwei chen via cfe-commits
https://github.com/weiweichen updated https://github.com/llvm/llvm-project/pull/96832 >From 37e0ff835b7ade8def6e141ae7a55d55380f887e Mon Sep 17 00:00:00 2001 From: Weiwei Chen Date: Wed, 26 Jun 2024 19:28:58 -0400 Subject: [PATCH 1/2] Bring initFeatureMap back to AArch64TargetInfo. --- clang/

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread weiwei chen via cfe-commits
https://github.com/weiweichen updated https://github.com/llvm/llvm-project/pull/96832 >From 37e0ff835b7ade8def6e141ae7a55d55380f887e Mon Sep 17 00:00:00 2001 From: Weiwei Chen Date: Wed, 26 Jun 2024 19:28:58 -0400 Subject: [PATCH 1/2] Bring initFeatureMap back to AArch64TargetInfo. --- clang/

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: weiwei chen (weiweichen) Changes We noticed that `TargetInfo::CreateTargetInfo` is giving up back empty `opt->featureMap` for AArch64, which is probably related to [this change](https://github.com/llvm/llvm-project/commit/a03d06

[clang] [Clang] Bring initFeatureMap back to AArch64TargetInfo. (PR #96832)

2024-06-26 Thread weiwei chen via cfe-commits
https://github.com/weiweichen created https://github.com/llvm/llvm-project/pull/96832 We noticed that `TargetInfo::CreateTargetInfo` is giving up back empty `opt->featureMap` for AArch64, which is probably related to [this change](https://github.com/llvm/llvm-project/commit/a03d06a736fd8921c8f