[clang] [Darwin][Driver][clang] arm64-apple-none-macho is missing the Apple macros from arm-apple-none-macho (PR #122427)

2025-01-10 Thread Jon Roelofs via cfe-commits
@@ -243,6 +247,8 @@ std::unique_ptr AllocateTarget(const llvm::Triple &Triple, case llvm::Triple::thumbeb: jroelofs wrote: oh, I missed that we're already lumping `arm-none-macho` & friends under `DarwinARMTargetInfo`. https://github.com/llvm/llvm-project/p

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-10 Thread Jon Roelofs via cfe-commits
@@ -2763,9 +2764,10 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(GlobalDecl GD, Attrs.addAttribute("fmv-features"); AddedAttr = true; } else if (!Feats.empty()) { - llvm::sort(Feats); + // Sort features and remove duplicates. + std::set Ord

[clang] [Darwin][Driver][clang] arm64-apple-none-macho is missing the Apple macros from arm-apple-none-macho (PR #122427)

2025-01-10 Thread Jon Roelofs via cfe-commits
@@ -243,6 +247,8 @@ std::unique_ptr AllocateTarget(const llvm::Triple &Triple, case llvm::Triple::thumbeb: jroelofs wrote: github won't let me add a comment in the right spot, but I think we need: ``` case llvm::Triple::arm: case llvm::Triple::thumb:

[clang] [FMV][AArch64] Changes in fmv-features metadata. (PR #122192)

2025-01-10 Thread Jon Roelofs via cfe-commits
@@ -2763,9 +2764,10 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(GlobalDecl GD, Attrs.addAttribute("fmv-features"); AddedAttr = true; } else if (!Feats.empty()) { - llvm::sort(Feats); + // Sort features and remove duplicates. + std::set Ord

[clang] [Darwin][Driver][clang] arm64-apple-none-macho is missing the Apple macros from arm-apple-none-macho (PR #122427)

2025-01-10 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/122427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [test][Driver][clang] Fix darwin-embedded-search-paths.c when CLANG_DEFAULT_CXX_STDLIB is libc++ (PR #122145)

2025-01-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/122145 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [test][Driver][clang] Fix darwin-embedded-search-paths.c when CLANG_DEFAULT_CXX_STDLIB is libc++ (PR #122145)

2025-01-08 Thread Jon Roelofs via cfe-commits
@@ -1,3 +1,4 @@ +// REQUIRES: default-cxx-stdlib=libstdc++ jroelofs wrote: I think it's fine. I'm not sure `REQUIRES` has a `!=` https://github.com/llvm/llvm-project/pull/122145 ___ cfe-commits mailing list cfe-commits

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/121921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #117268)

2025-01-07 Thread Jon Roelofs via cfe-commits
jroelofs wrote: also: ``` clang/lib/Driver/ToolChains/SYCL.h:27:17: warning: private field 'D' is not used [-Wunused-private-field] ``` https://github.com/llvm/llvm-project/pull/117268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #117268)

2025-01-07 Thread Jon Roelofs via cfe-commits
jroelofs wrote: I see a new warning from this patch: ``` clang/lib/Driver/ToolChains/SYCL.cpp:35:10: warning: returning address of local temporary object [-Wreturn-stack-address] ``` https://github.com/llvm/llvm-project/pull/117268 ___ cfe-commits mai

[clang] [llvm] [FMV][AArch64] Simplify version selection according to ACLE. (PR #121921)

2025-01-07 Thread Jon Roelofs via cfe-commits
@@ -49,16 +49,11 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA } unsigned AArch64::getFMVPriority(ArrayRef Features) { jroelofs wrote: I'm not sure that this interface can correctly describe the new rule. ISTM it would have to be a compar

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2025-01-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2025-01-03 Thread Jon Roelofs via cfe-commits
jroelofs wrote: IIUC `__MACH__` means "the kernel is Mach, and we're going to be loaded by dyld", and `apple-none-macho` targets is _not_ that. > as Swift expects all MachO targets to have that defined. can you elaborate on that expectation? https://github.com/llvm/llvm-project/pull/120507 __

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/120507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -290,8 +290,50 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { /// } }; +/// Apple specific MachO extensions +class LLVM_LIBRARY_VISIBILITY AppleMachO : public MachO { +public: + AppleMachO(const Driver &D, const llvm::Triple &Triple, + const llvm

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,43 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Unlike the Darwin driver, the MachO driver doesn't add any framework search paths, +// only the normal header ones. +// RUN: %clang -x c -t

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -290,8 +290,50 @@ class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain { /// } }; +/// Apple specific MachO extensions +class LLVM_LIBRARY_VISIBILITY AppleMachO : public MachO { +public: + AppleMachO(const Driver &D, const llvm::Triple &Triple, + const llvm

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-20 Thread Jon Roelofs via cfe-commits
@@ -1018,13 +1018,19 @@ bool Darwin::hasBlocksRuntime() const { } } -void Darwin::AddCudaIncludeArgs(const ArgList &DriverArgs, -ArgStringList &CC1Args) const { +void MachO::AddCudaIncludeArgs(const ArgList &DriverArgs, +

[clang] [clang][NFC] Fix the static assertion in 4797437 (PR #120643)

2024-12-20 Thread Jon Roelofs via cfe-commits
jroelofs wrote: may as well address @nikic's post-commit suggestion to move this out of the header, and into a source file, while you're here: https://github.com/llvm/llvm-project/pull/120341#discussion_r1893822845 https://github.com/llvm/llvm-project/pull/120643 __

[clang] [clang][NFC] Fix the static assertion in 4797437 (PR #120643)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -114,10 +114,9 @@ class alignas(void *) Stmt { #define STMT(CLASS, PARENT) #define STMT_RANGE(BASE, FIRST, LAST) #define LAST_STMT_RANGE(BASE, FIRST, LAST) \ - static_assert(

[clang] [clang][NFC] Fix the static assertion in 4797437 (PR #120643)

2024-12-19 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/120643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Fix the static assertion in 4797437 (PR #120643)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -114,10 +114,10 @@ class alignas(void *) Stmt { #define STMT(CLASS, PARENT) #define STMT_RANGE(BASE, FIRST, LAST) #define LAST_STMT_RANGE(BASE, FIRST, LAST) \ - static_assert(

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + jroelofs wrote: As written, this requires an `aarch64-registered-target`. I think you can avoid that though by turning these

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,55 @@ +// UNSUPPORTED: system-windows +// Windows is unsupported because we use the Unix path separator `/` in the test. + +// Add default directories before running clang to check default +// search paths. +// RUN: rm -rf %t && mkdir -p %t +// RUN: cp -R %S/Inputs/M

[clang] [Darwin][Driver][clang] apple-none-macho orders the resource directory after internal-externc-isystem when nostdlibinc is used (PR #120507)

2024-12-19 Thread Jon Roelofs via cfe-commits
@@ -2631,55 +2643,65 @@ void DarwinClang::AddClangCXXStdlibIncludeArgs( } case ToolChain::CST_Libstdcxx: -llvm::SmallString<128> UsrIncludeCxx = Sysroot; -llvm::sys::path::append(UsrIncludeCxx, "usr", "include", "c++"); - -llvm::Triple::ArchType arch = getTripl

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/120341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > > > Let's just increase to 9 bits. > > > Have you checked whether the size of `Stmt` or `Expr` changes when you do > > > this? > > > > > > I have these concerns as well, this ends up affecting the size of a lot of > > things > > That said, StmtNodes.td already has 267 it

[clang] [clang][NFC] Increase NumStmtBits by 2 as we are approaching the limit (PR #120341)

2024-12-18 Thread Jon Roelofs via cfe-commits
@@ -109,16 +109,27 @@ class alignas(void *) Stmt { //===--- Statement bitfields classes ---===// + enum { NumStmtBits = 10 }; + +#define STMT(CLASS, PARENT) +#define STMT_RANGE(BASE, FIRST, LAST) +#define LAST_STMT_RANGE(BASE, FIRST, LAST)

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-10 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > > > Suppose you have target_version("i8mm+dotprod") and > > > target_version("fcma"). The first version clearly has higher priority > > > > > > According to the [current > > rules](https://arm-software.github.io/acle/main/acle.html#selection) yes, > > but IMO that rule is

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/118581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-09 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/118581 >From 46775c380244e47ddd9a3188651f37c3a3b33d23 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 3 Dec 2024 18:04:49 -0800 Subject: [PATCH 1/6] Add processor aliases back to -print-supported-cpus and -mcpu

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-04 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Looks okay to me, but let me tag some clang-tools-extra folks for a second look. https://github.com/llvm/llvm-project/pull/118522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-04 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,15 @@ +// REQUIRES: clang +// RUN: not %clang %s -serialize-diagnostics %s.diag jroelofs wrote: recommend putting the new file under `%t` instead of `%s`, so this doesn't pollute the source dir. https://github.com/llvm/llvm-project/pull/118522 __

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-04 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/118581 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-04 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/118581 >From 46775c380244e47ddd9a3188651f37c3a3b33d23 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 3 Dec 2024 18:04:49 -0800 Subject: [PATCH 1/3] Add processor aliases back to -print-supported-cpus and -mcpu

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-04 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > Looking at the test failure, it appears that when only building > `check-clang-tools`, no `clang` binary was built. So the test driver cannot > find `clang`. Maybe this diagnostics binary file should be checked in for the > test? That will not catch future errors if the diagn

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-04 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > > A motivating example might be target_version("simd+dotprod") and > > target_version("sve"): when sve is available we should pick that version, > > but the current rule prioritizes the number of attribute-specified features > > over their overall weight. > > I agree about t

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-03 Thread Jon Roelofs via cfe-commits
@@ -25,3 +26,12 @@ // CHECK-ARM: cortex-a73 // CHECK-ARM: cortex-a75 // CHECK-ARM: Use -mcpu or -mtune to specify the target's processor. + +// RUN: %clang --target=arm64-apple-macosx --print-supported-cpus 2>&1 | \ +// RUN: FileCheck %s --check-prefix=CHECK-AARCH64 --implic

[clang] [llvm] Add processor aliases back to -print-supported-cpus and -mcpu=help (PR #118581)

2024-12-03 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/118581 They were accidentally dropped in https://github.com/llvm/llvm-project/pull/96249 rdar://140853882 >From 46775c380244e47ddd9a3188651f37c3a3b33d23 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 3 Dec 2

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,14 @@ +// RUN: %clang %s -serialize-diagnostics %s.diag || true jroelofs wrote: ```suggestion // RUN: not %clang %s -serialize-diagnostics %s.diag ``` https://github.com/llvm/llvm-project/pull/118522 ___ cfe

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,129 @@ +//=== ClangReadDiagnostics.cpp - clang-read-diagnostics tool --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] Add new tool: clang-read-diagnostics (PR #118522)

2024-12-03 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,10 @@ +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) jroelofs wrote: I'm not sure this is necessary. https://github.com/llvm/llvm-project/pull/118522 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-03 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. The patch itself LGTM though, despite my gripes on the current prioritization rule. https://github.com/llvm/llvm-project/pull/118544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [FMV][AArch64][clang] Emit fmv-features metadata in LLVM IR. (PR #118544)

2024-12-03 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > Suppose you have target_version("i8mm+dotprod") and target_version("fcma"). > The first version clearly has higher priority According to the [current rules](https://arm-software.github.io/acle/main/acle.html#selection) yes, but IMO that rule is broken and doesn't match user

[clang] [clang][ARM] disable frame pointers by default for bare metal ARM targets (PR #117140)

2024-11-28 Thread Jon Roelofs via cfe-commits
@@ -151,6 +152,9 @@ static bool useFramePointerForTargetByDefault(const llvm::opt::ArgList &Args, } } + if (toolchains::isARMBareMetal(Triple)) jroelofs wrote: good idea re: `isArmEABIBareMetal` https://github.com/llvm/llvm-project/pull/117140 __

[clang] [llvm][ARM] Restore the default to -mstrict-align on Apple firmwares (PR #115546)

2024-11-15 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/115546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. LGTM as a refactor. We don't need to solve the spec clarification thing in this PR: https://github.com/llvm/llvm-project/pull/116257/files#r1844489795 https://github.com/llvm/llvm-project/pull/116257 __

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Jon Roelofs via cfe-commits
@@ -48,6 +48,19 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA return {}; } +unsigned AArch64::getFMVPriority(ArrayRef Features) { + constexpr unsigned MaxFMVPriority = 1000; + unsigned Priority = 0; + unsigned NumFeatures = 0; + for (StringRef Feature

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs edited https://github.com/llvm/llvm-project/pull/116257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Jon Roelofs via cfe-commits
@@ -48,6 +48,19 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA return {}; } +unsigned AArch64::getFMVPriority(ArrayRef Features) { + constexpr unsigned MaxFMVPriority = 1000; + unsigned Priority = 0; + unsigned NumFeatures = 0; + for (StringRef Feature

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Jon Roelofs via cfe-commits
@@ -48,6 +48,19 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA return {}; } +unsigned AArch64::getFMVPriority(ArrayRef Features) { + constexpr unsigned MaxFMVPriority = 1000; + unsigned Priority = 0; + unsigned NumFeatures = 0; + for (StringRef Feature

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Jon Roelofs via cfe-commits
@@ -48,6 +48,19 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA return {}; } +unsigned AArch64::getFMVPriority(ArrayRef Features) { + constexpr unsigned MaxFMVPriority = 1000; + unsigned Priority = 0; + unsigned NumFeatures = 0; + for (StringRef Feature

[clang] [llvm] [NFC][clang][FMV][TargetInfo] Refactor API for FMV feature priority. (PR #116257)

2024-11-15 Thread Jon Roelofs via cfe-commits
@@ -48,6 +48,19 @@ std::optional AArch64::ArchInfo::findBySubArch(StringRef SubA return {}; } +unsigned AArch64::getFMVPriority(ArrayRef Features) { + constexpr unsigned MaxFMVPriority = 1000; + unsigned Priority = 0; + unsigned NumFeatures = 0; + for (StringRef Feature

[clang] [FMV] Add "+fmv" to the target-features of versioned functions. (PR #116028)

2024-11-13 Thread Jon Roelofs via cfe-commits
@@ -91,17 +91,20 @@ void sc_caller(void) __arm_streaming_compatible { } -// CHECK: attributes #[[ATTR0:[0-9]+]] = {{.*}} "aarch64_pstate_sm_body" -// CHECK: attributes #[[ATTR1:[0-9]+]] = {{.*}} "aarch64_pstate_sm_body" -// CHECK: attributes #[[ATTR2:[0-9]+]] = {{.*}} -// CHE

[clang] [FMV] Add "+fmv" to the target-features of versioned functions. (PR #116028)

2024-11-13 Thread Jon Roelofs via cfe-commits
@@ -91,17 +91,20 @@ void sc_caller(void) __arm_streaming_compatible { } -// CHECK: attributes #[[ATTR0:[0-9]+]] = {{.*}} "aarch64_pstate_sm_body" -// CHECK: attributes #[[ATTR1:[0-9]+]] = {{.*}} "aarch64_pstate_sm_body" -// CHECK: attributes #[[ATTR2:[0-9]+]] = {{.*}} -// CHE

[clang] [FMV] Add "+fmv" to the target-features of versioned functions. (PR #116028)

2024-11-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/116028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FMV] Add "+fmv" to the target-features of versioned functions. (PR #116028)

2024-11-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs deleted https://github.com/llvm/llvm-project/pull/116028 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-11-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/111962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2024-11-12 Thread Jon Roelofs via cfe-commits
jroelofs wrote: At the very least, the fixit shouldn't be recommending precisely what the user wrote, which funnily enough, gcc also gets wrong: https://clang.godbolt.org/z/88sqM5xET https://github.com/llvm/llvm-project/pull/74440 ___ cfe-commits mai

[clang] [llvm] [FMV][AArch64] Expand feature dependencies using AArch64::ExtensionSet. (PR #113281)

2024-11-12 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/113281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2024-11-11 Thread Jon Roelofs via cfe-commits
jroelofs wrote: I think this diagnostic should not be firing on `%x` format specifiers: https://clang.godbolt.org/z/YGh1qdq1h ``` #include void bad() { int u = 0; printf("%x\n", u); } ``` ``` :5:20: warning: format specifies type 'unsigned int' but the argument has type 'int' [-Wfor

[clang] [llvm][ARM] Restore the default to -mstrict-align on Apple firmwares (PR #115546)

2024-11-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/115546 >From a54e1c1b7ff03fa0f29b0a64e290763d6b085df8 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Fri, 8 Nov 2024 13:46:33 -0800 Subject: [PATCH 1/2] [llvm][ARM] Restore the default to -mstrict-align on Apple fi

[clang] [llvm][ARM] Restore the default to -mstrict-align on Apple firmwares (PR #115546)

2024-11-08 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs created https://github.com/llvm/llvm-project/pull/115546 This is a partial revert of e314622f204a01ffeda59cbe046dd403b01f8b74 rdar://139237593 >From a54e1c1b7ff03fa0f29b0a64e290763d6b085df8 Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Fri, 8 Nov 2024 13:46:33 -

[clang] [compiler-rt] [llvm] [FMV] Remove feature dgh. (PR #115363)

2024-11-07 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/115363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features which expose non exploitable runtime behavior. (PR #114387)

2024-11-07 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/114387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add ifunc support for Windows on AArch64. (PR #111962)

2024-11-06 Thread Jon Roelofs via cfe-commits
@@ -5796,12 +5796,18 @@ declared entity. The entity must not have weak linkage; for example, in C++, it cannot be applied to a declaration if a definition at that location would be considered inline. -Not all targets support this attribute. ELF target support depends on both

[clang] [clang] Fix a typo in clangs README (PR #114410)

2024-11-02 Thread Jon Roelofs via cfe-commits
jroelofs wrote: sure! https://github.com/llvm/llvm-project/pull/114410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a typo in clangs README (PR #114410)

2024-11-02 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/114410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Are you also planning to do the feature test macros, e.g. `__ARM_FEATURE_FP8`? https://github.com/llvm/llvm-project/pull/100608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [clang] Fix a typo in clangs README (PR #114410)

2024-10-31 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/114410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[Utils] add update-verify-tests.py" (#108630)" (PR #108658)

2024-10-25 Thread Jon Roelofs via cfe-commits
jroelofs wrote: oh, right. nvm https://github.com/llvm/llvm-project/pull/108658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[Utils] add update-verify-tests.py" (#108630)" (PR #108658)

2024-10-25 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > The ; did you mean to use BAR? version was accidentally emitted in some > cases where it didn't make sense to do so, but the tests still passed because > the diagnostic did contain cannot use FOO in context asdf. There's a `FileCheck` flag to enforce this: `--match-full-line

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify features memtag and memtag2. (PR #112511)

2024-10-21 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/112511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify features memtag and memtag2. (PR #112511)

2024-10-16 Thread Jon Roelofs via cfe-commits
jroelofs wrote: > However these instructions only work at Exception Level 1, so they would be > unusable since FMV is a user space facility. I don't understand this distinction: why is FMV seen as user-space only? https://github.com/llvm/llvm-project/pull/112511 ___

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify features ssbs and ssbs2. (PR #110297)

2024-10-04 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/110297 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add missing deps edge: CodeGenAction.cpp.o -> GenVT.inc (PR #109306)

2024-09-24 Thread Jon Roelofs via cfe-commits
jroelofs wrote: @mgorny https://github.com/llvm/llvm-project/pull/109601 https://github.com/llvm/llvm-project/pull/109306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Jon Roelofs via cfe-commits
jroelofs wrote: @compnerd @etcwilde WDYT about conditionalizing the new dependency with an `if (TARGET vt_gen)` instead of doing the `add_subdirectory()` dance? https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@

[clang] Add missing deps edge: CodeGenAction.cpp.o -> GenVT.inc (PR #109306)

2024-09-19 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/109306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-14 Thread Jon Roelofs via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, jroelofs wrote: We could do that automatically every release by putting the version number in its name. https://github.com/llvm/llvm-project/pull/108024

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove feature sha1 from FMV. (PR #108383)

2024-09-13 Thread Jon Roelofs via cfe-commits
@@ -33,7 +33,6 @@ enum CPUFeatures { FEAT_FP, FEAT_SIMD, FEAT_CRC, - FEAT_SHA1, jroelofs wrote: Here are the other threads: https://github.com/llvm/llvm-project/pull/108024#discussion_r1757249346 https://github.com/llvm/llvm-project/pull/88965#discussio

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-13 Thread Jon Roelofs via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, jroelofs wrote: https://github.com/llvm/llvm-project/pull/88965#discussion_r1567997481 > Did any implementation ship __aarch64_cpu_features in a way that

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs deleted https://github.com/llvm/llvm-project/pull/108024 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-13 Thread Jon Roelofs via cfe-commits
@@ -73,8 +73,6 @@ enum CPUFeatures { FEAT_SSBS, FEAT_SSBS2, FEAT_BTI, - FEAT_LS64, - FEAT_LS64_V, jroelofs wrote: https://github.com/llvm/llvm-project/pull/88965#discussion_r1567997481 https://github.com/llvm/llvm-project/pull/108024 _

[clang] b3f3c0c - [clang][AArch64] Put soft-float ABI checks under isSoftFloat(). NFC

2024-09-11 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2024-09-11T13:37:45-07:00 New Revision: b3f3c0c63358b412348022d10308b97332d02bcd URL: https://github.com/llvm/llvm-project/commit/b3f3c0c63358b412348022d10308b97332d02bcd DIFF: https://github.com/llvm/llvm-project/commit/b3f3c0c63358b412348022d10308b97332d02bcd.diff L

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs deleted https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -404,142 +370,174 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; -bool SemaARM::ParseSVEImmChecks( -CallExpr *TheCall, SmallVector, 3> &ImmChecks) { - // Perform all the immediate checks for this builtin call. +bool SemaARM::CheckImmediateArg(CallExpr *Th

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -216,6 +216,36 @@ namespace clang { } bool isUnsigned() const { return (Flags & UnsignedFlag) != 0; } bool isQuad() const { return (Flags & QuadFlag) != 0; } +unsigned getEltSizeInBits() const { + switch (getEltType()) { + case Int8: + case Pol

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -216,6 +216,36 @@ namespace clang { } bool isUnsigned() const { return (Flags & UnsignedFlag) != 0; } bool isQuad() const { return (Flags & QuadFlag) != 0; } +unsigned getEltSizeInBits() const { + switch (getEltType()) { + case Int8: + case Pol

[clang] [llvm] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-09-06 Thread Jon Roelofs via cfe-commits
@@ -404,142 +370,174 @@ enum ArmSMEState : unsigned { ArmZT0Mask = 0b11 << 2 }; -bool SemaARM::ParseSVEImmChecks( -CallExpr *TheCall, SmallVector, 3> &ImmChecks) { - // Perform all the immediate checks for this builtin call. +bool SemaARM::CheckImmediateArg(CallExpr *Th

[clang] [llvm] [AArch64] Make apple-m4 armv8.7-a again (from armv9.2-a). (PR #106312)

2024-08-27 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/106312 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Split FeatureLS64 to LS64_ACCDATA and LS64_V. (PR #101712)

2024-08-27 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/101712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Point the nofp ABI check diagnostics at the callee (PR #103392)

2024-08-14 Thread Jon Roelofs via cfe-commits
jroelofs wrote: /cherry-pick 019ef522756886caa258daf68d877f84abc1b878 https://github.com/llvm/llvm-project/pull/103392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Point the nofp ABI check diagnostics at the callee (PR #103392)

2024-08-14 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs closed https://github.com/llvm/llvm-project/pull/103392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AArch64] Point the nofp ABI check diagnostics at the callee (PR #103392)

2024-08-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs updated https://github.com/llvm/llvm-project/pull/103392 >From a6af41dd6da847237e79ce57b3847bbc241b2cba Mon Sep 17 00:00:00 2001 From: Jon Roelofs Date: Tue, 13 Aug 2024 10:59:25 -0700 Subject: [PATCH 1/2] [clang][AArch64] Point the nofp ABI check diagnostics at the

[clang] [clang][AArch64] Point the nofp ABI check diagnostics at the callee (PR #103392)

2024-08-13 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs milestoned https://github.com/llvm/llvm-project/pull/103392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >