[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-05-14 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > If you would like to credit the original author for the PTRADD nodd that > > would be @davidchisnall (and probably some parts by @jrtc27, although that > > might just be the combines). I don't see any problems in landing that part > > separately > > Sounds like a good u

[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-05-13 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Hi @rgwott, I'm working on changes in the AMDGPU backend that would benefit > from the PTRADD SelectionDAG opcode that this PR adds. I understand that this > PR is low priority for you right now, so I'd like to suggest extracting the > relevant changes to enable PTRADD nod

[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-04-29 Thread Alexander Richardson via cfe-commits
@@ -2602,6 +2605,100 @@ SDValue DAGCombiner::foldSubToAvg(SDNode *N, const SDLoc &DL) { return SDValue(); } +/// Try to fold a pointer arithmetic node. +/// This needs to be done separately from normal addition, because pointer +/// addition is not commutative. +/// This fu

[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-04-09 Thread Alexander Richardson via cfe-commits
arichardson wrote: ping @rgwott. Any chance you will have time to update this PR and address the outstanding comments? https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-04-05 Thread Alexander Richardson via cfe-commits
@@ -223,6 +223,13 @@ endif() # This can be used to detect whether we're in the runtimes build. set(LLVM_RUNTIMES_BUILD ON) +if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + # Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't s

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. 'Thraed' typo in the commit message but otherwise LGTM. But someone else should also approve this. https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits mailing list cfe-commits@lis

[clang] [llvm] [clang][IR] Overload @llvm.thread.pointer to support non-AS0 targets (PR #132489)

2025-03-22 Thread Alexander Richardson via cfe-commits
arichardson wrote: Would be good to get a review from e.g. amdgpu folks since the non-zero globals AS would result in a functional change (assuming this intrinsic is supported there). https://github.com/llvm/llvm-project/pull/132489 ___ cfe-commits m

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-03-20 Thread Alexander Richardson via cfe-commits
arichardson wrote: This makes a lot of sense to me, just wondering why you chose `clang/lib/CodeGen/BuiltinTargets/` rather than `clang/lib/CodeGen/TargetBuiltins/`? The former shounds like it contains the list of all builtin targets, rather than the codegen for target-specific builtins. htt

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
@@ -3143,7 +3143,10 @@ as follows: specified, the default index size is equal to the pointer size. All sizes are in bits. The address space, ``n``, is optional, and if not specified, denotes the default address space 0. The value of ``n`` must be -in the range [

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DataLayout] Introduce sentinel pointer value (PR #131557)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/131557 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via cfe-commits
@@ -1187,16 +1187,19 @@ endif() # Build with _XOPEN_SOURCE on AIX, as stray macros in _ALL_SOURCE mode tend to # break things. In this case we need to enable the large-file API as well. if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX") - add_compile_definitions(_XOPEN_S

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson I found the way to override the cache file. Thanks for the > suggestion! Thanks this looks good to me. https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-15 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. Wouldn't it be more maintainable to just set the value to off for AIX where the `option()` is defined? https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-14 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > Wouldn't it be more maintainable to just force the value to OFF for AIX > > where the `option()` is defined? > > Unfortunately, the cmake command line option `-D > LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON` overrides the `option()` in the cmake > file. Sorry if this was no

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-13 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/131200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][RISCV] Make asm statement volatile (PR #130286)

2025-03-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/130286 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-03-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-03-07 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson as promised, I have rebased the changes. I'm not sure about the > test failures, it would seem to me that they are unlikely to be caused by > anything I did? Yes it looks like an issue with the android CI setup, nothing related to this patch I believe. https

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-03-07 Thread Alexander Richardson via cfe-commits
@@ -715,8 +715,16 @@ MCSymbol *AsmPrinter::getSymbolPreferLocal(const GlobalValue &GV) const { return TM.getSymbol(&GV); } -/// EmitGlobalVariable - Emit the specified global variable to the .s file. void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { + MaybeA

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-03-06 Thread Alexander Richardson via cfe-commits
@@ -715,8 +715,16 @@ MCSymbol *AsmPrinter::getSymbolPreferLocal(const GlobalValue &GV) const { return TM.getSymbol(&GV); } -/// EmitGlobalVariable - Emit the specified global variable to the .s file. void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) { + MaybeA

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-03-06 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/121957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-03-06 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. This looks good to me and it should be possible to use this for CHERI downstream as well. https://github.com/llvm/llvm-project/pull/121957 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [clang-format] Add the C language instead of treating it like C++ (PR #128287)

2025-02-27 Thread Alexander Richardson via cfe-commits
@@ -3957,7 +3958,12 @@ LangOptions getFormattingLangOpts(const FormatStyle &Style) { LangOpts.Digraphs = LexingStd >= FormatStyle::LS_Cpp11; LangOpts.LineComment = 1; - LangOpts.CXXOperatorNames = Style.isCpp(); + + const auto Language = Style.Language; + LangOpts.C17

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
@@ -223,6 +221,41 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_COMPACT_UNWIND (0) +#if !_LIBUNWIND_TRACING_COMPACT_UNWIND +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0(msg) +#define _LIBUNWIND_TRACE_COMPACT_UNWIND(msg, ...) +#else +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
@@ -223,6 +221,41 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_COMPACT_UNWIND (0) +#if !_LIBUNWIND_TRACING_COMPACT_UNWIND +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0(msg) +#define _LIBUNWIND_TRACE_COMPACT_UNWIND(msg, ...) +#else +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: This looks like a nice improvement. Some minor questions inline https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
@@ -223,6 +221,41 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_COMPACT_UNWIND (0) +#if !_LIBUNWIND_TRACING_COMPACT_UNWIND +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0(msg) +#define _LIBUNWIND_TRACE_COMPACT_UNWIND(msg, ...) +#else +#define _LIBUNWIND_TRACE_COMPACT_UNWIND0

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Remove unnecessary dependencies on fprintf and stdio.h for increased baremetal friendliness (PR #72040)

2025-02-18 Thread Alexander Richardson via cfe-commits
@@ -381,24 +381,22 @@ typename A::pint_t DwarfInstructions::evaluateExpression(pint_t expression, A &addressSpace, const R ®isters, pint_t initialStackValue) { - const bool log = false;

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/126302 >From 6b89c65eb61a7c2565b96caedd11eb2efff61021 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 7 Feb 2025 12:14:20 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/126302 >From 6b89c65eb61a7c2565b96caedd11eb2efff61021 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 7 Feb 2025 12:14:20 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/126302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/126302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-16 Thread Alexander Richardson via cfe-commits
@@ -1,9 +1,13 @@ // RUN: %clangxx %s -### -o %t.o --target=amd64-unknown-freebsd -stdlib=platform 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s // RUN: %clangxx %s -### -o %t.o --target=amd64-unknown-freebsd10.0 -stdlib=platform 2>&1 \ -// RUN: | FileCheck --

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-15 Thread Alexander Richardson via cfe-commits
arichardson wrote: ping, is this ok to merge? https://github.com/llvm/llvm-project/pull/126302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-10 Thread Alexander Richardson via cfe-commits
arichardson wrote: > It's not missing as in like someone forgot. It is intentional. Same goes for > FreeBSD and OpenBSD's Drivers. The base OS uses libc++ and anything else is > not supported. You can install it from ports though and it should be possible to use that? https://github.com/llvm/

[clang] [CSKY] Default to unsigned char (PR #115961)

2025-02-09 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/115961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CSKY] Default to unsigned char (PR #115961)

2025-02-08 Thread Alexander Richardson via cfe-commits
arichardson wrote: > LGTM. But I think commit msg should be refined(this PR is not for > upstreaming?) Thanks for reviewing! Sorry what do you mean by commit message needs to be refined? I created this using the spr tool and when merging the description of the PR will be used. Is there someth

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Alexander Richardson via cfe-commits
@@ -452,12 +452,12 @@ void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const { + Generic_ELF::AddCXXStdlibLibArgs(Args, CmdArgs); unsi

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Alexander Richardson via cfe-commits
@@ -452,12 +452,12 @@ void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const { + Generic_ELF::AddCXXStdlibLibArgs(Args, CmdArgs); unsi

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Alexander Richardson via cfe-commits
@@ -452,12 +452,12 @@ void FreeBSD::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const { + Generic_ELF::AddCXXStdlibLibArgs(Args, CmdArgs); unsi

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/126302 >From 6b89c65eb61a7c2565b96caedd11eb2efff61021 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 7 Feb 2025 12:14:20 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] [FreeBSD] Support -stdlib=libstdc++ (PR #126302)

2025-02-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/126302 The experimental-library-flag.cpp test was failing on FreeBSD builders, which turned to be caused by missing support for -stdlib=libcstdc++ (and just using a hardcoded libc++ in all cases). Simplify FreeBSD::

[clang] [CSKY] Default to unsigned char (PR #115961)

2025-01-21 Thread Alexander Richardson via cfe-commits
arichardson wrote: ping https://github.com/llvm/llvm-project/pull/115961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-12 Thread Alexander Richardson via cfe-commits
@@ -122,6 +122,14 @@ def parse_clang_ast_json(node, loc, search): if search is None: search = spell mangled = node.get("mangledName", spell) +# Clang's AST dump includes the globals prefix, but when Clang emits +# LLVM IR this is not

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-10 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. Thanks this LGTM https://github.com/llvm/llvm-project/pull/121800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [update_cc_test_checks] Add test for missing handling of mangled names (PR #121976)

2025-01-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/121976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. A few suggestions but this should be good to land once formatting has been fixed and the baseline test is in. I'd also drop the regen of the neon intrinsics from this patch and do that separately. https://github.com/llvm/l

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-07 Thread Alexander Richardson via cfe-commits
@@ -650,6 +655,16 @@ def get_triple_from_march(march): print("Cannot find a triple. Assume 'x86'", file=sys.stderr) return "x86" +def get_global_underscores(raw_tool_output): +m = DATA_LAYOUT_RE.search(raw_tool_output) +if not m: +return False +data

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-07 Thread Alexander Richardson via cfe-commits
@@ -122,6 +122,11 @@ def parse_clang_ast_json(node, loc, search): if search is None: search = spell mangled = node.get("mangledName", spell) +# Strip leading underscore from globals, so the name matches the LLVM one arichard

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-07 Thread Alexander Richardson via cfe-commits
arichardson wrote: So it looks like this happens to work if we already mapped the function to another mangled name previously which is why the macho happens to work if we generated CHECK lines for ELF already. https://github.com/llvm/llvm-project/pull/121800 ___

[clang] [update_cc_test_checks] Add test for missing handling of mangled names (PR #121976)

2025-01-07 Thread Alexander Richardson via cfe-commits
arichardson wrote: Will merge this once CI is happy. https://github.com/llvm/llvm-project/pull/121976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [update_cc_test_checks] Add test for missing handling of mangled names (PR #121976)

2025-01-07 Thread Alexander Richardson via cfe-commits
arichardson wrote: @momchil-velikov I've added a baseline test here that should be fixed/improved by your change. https://github.com/llvm/llvm-project/pull/121976 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [update_cc_test_checks] Add test for missing handling of mangled names (PR #121976)

2025-01-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/121976 We are missing MSVC C++ functions since the name is quoted in the LLVM IR, so we don't find them in the generated IR and therefore don't add the test checks. Additionally, there is an issue with finding funct

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-07 Thread Alexander Richardson via cfe-commits
arichardson wrote: I've been looking into this a bit and I can see that this works for for most function but for some reason fails with NEON vector type arguments/return values. Even though the mangled name is identitical. I will pre-commit some tests for this. https://github.com/llvm/llvm-pr

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-06 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. Code needs formatting and missing tests. https://github.com/llvm/llvm-project/pull/121800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-06 Thread Alexander Richardson via cfe-commits
@@ -650,6 +655,16 @@ def get_triple_from_march(march): print("Cannot find a triple. Assume 'x86'", file=sys.stderr) return "x86" +def get_global_underscores(raw_tool_output): +m = DATA_LAYOUT_RE.search(raw_tool_output) +if not m: +return False +data

[clang] [llvm] Handle leading underscores in update_cc_test_checks.py (PR #121800)

2025-01-06 Thread Alexander Richardson via cfe-commits
arichardson wrote: Could you give me an example of such an architecture? Isn't it a bug that clang reports an incorrect mangled name? Also please add a test for this (ideally pre-committing one that fails before and passes with this change). https://github.com/llvm/llvm-project/pull/121800 ___

[clang] [CSKY] Default to unsigned char (PR #115961)

2024-12-30 Thread Alexander Richardson via cfe-commits
arichardson wrote: @zixuan-wu (or anyone else who knows about CSKY) ping https://github.com/llvm/llvm-project/pull/115961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Alexander Richardson via cfe-commits
@@ -133,6 +133,10 @@ _LIBUNWIND_EXPORT _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) { unw_cursor_t cursor; unw_context_t uc; +#if __has_feature(memory_sanitizer) + __builtin_memset(&cursor, 0, sizeof(cursor)); arichardson wro

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. We shouldn't need to initialize these structures to silence sanitizer errors. I had a draft pr last year to fix this properly but forgot about it since other things came up: https://github.com/llvm/llvm-project/pull/67860 I

[libunwind] [Libunwind] Try to fix msan failures (PR #120013)

2024-12-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/120013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-12 Thread Alexander Richardson via cfe-commits
@@ -808,6 +808,10 @@ void Verifier::visitGlobalValue(const GlobalValue &GV) { "visibility must be dso_local!", &GV); + if (GV.isTagged()) { arichardson wrote: Back in 2019 or so we had very similar issues in the CHERI downstream due to k

[clang] [clang-tools-extra] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-12-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: I had to do something very similar for CHERI downstream: We have to ensure that all globals are precisely representable (which may require rounding up the size+alignment) so you don't end up creating bounds that include adjacent ones. The original patch

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexander Richardson via cfe-commits
arichardson wrote: Looking at https://github.com/llvm/llvm-project/pull/118008 it sounds like we don't yet have complete codegen support for XTensa in Clang, so it sounds like this is safe without a flag. https://github.com/llvm/llvm-project/pull/115967

[clang] [CSKY] Default to unsigned char (PR #115961)

2024-12-02 Thread Alexander Richardson via cfe-commits
arichardson wrote: ping https://github.com/llvm/llvm-project/pull/115961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/115967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/115967 >From e428a45e9638d0d310bd21e46acf4175b09815c9 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 12 Nov 2024 16:24:08 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-02 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/115967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-12-01 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Hi @arichardson. > > Thanks for this change. Acc to the doc which I have `The char type is > unsigned by default for Xtensa processors.` Our GCC Xtensa toolchain also > interprets char type as unsigned by default. Thanks, do you believe we need a backwards compatibility f

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-11-23 Thread Alexander Richardson via cfe-commits
arichardson wrote: Could you address the raised issues instead of constantly updating the branch? This wastes CI resources and spams everyone subscribed to this PR. Please feel free to reopen it once you have addressed the issues. https://github.com/llvm/llvm-project/pull/79667 ___

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-11-23 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/79667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix compilation for the x32 ABI. (PR #116608)

2024-11-20 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > ⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️ > > Ok, but this is just clearly silly given the surrounding code. Yes I would ignore this. This change looks reasonable to me. I have no experience with the x32 parts of libunwind, but if it fixes the

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-11-13 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/115967 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MSP430] Default to unsigned char (PR #115964)

2024-11-12 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/115964 >From 712bbc59b1976a35c8aba4bdea8728d7e9f2b425 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 12 Nov 2024 16:02:17 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?

[clang] [Xtensa] Default to unsigned char (PR #115967)

2024-11-12 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/115967 This matches GCC. Partially fixes https://github.com/llvm/llvm-project/pull/115964 >From e428a45e9638d0d310bd21e46acf4175b09815c9 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 12 Nov 2024 16:2

[clang] [MSP430] Default to unsigned char (PR #115964)

2024-11-12 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/115964 >From 712bbc59b1976a35c8aba4bdea8728d7e9f2b425 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Tue, 12 Nov 2024 16:02:17 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?

[clang] [MSP430] Default to unsigned char (PR #115964)

2024-11-12 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/115964 This matches the ABI document at https://www.ti.com/lit/pdf/slaa534 as well as the GCC implementation. Partially fixes https://github.com/llvm/llvm-project/issues/115957. >From 712bbc59b1976a35c8aba4bdea87

[clang] [CSKY] Default to unsigned char (PR #115961)

2024-11-12 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/115961 This matches the ABI document found at https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf Partially addresses https://github.com/llvm/llvm-project/i

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-11-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/111235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-11-04 Thread Alexander Richardson via cfe-commits
@@ -238,7 +236,8 @@ END_COMPILERRT_OUTLINE_FUNCTION(__arm_sc_memcpy) DEFINE_COMPILERRT_FUNCTION_ALIAS(__arm_sc_memmove, __arm_sc_memcpy) - +// This version uses FP registers. Use this only on targets with them +#if defined(__aarch64__) && __ARM_FP != 0 aricha

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-29 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. There are tons of unrelated changes that make this really hard to review. Please do the formatting part of the changes separately and address the outstanding comments. https://github.com/llvm/llvm-project/pull/79667 ___

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-10 Thread Alexander Richardson via cfe-commits
@@ -238,7 +236,8 @@ END_COMPILERRT_OUTLINE_FUNCTION(__arm_sc_memcpy) DEFINE_COMPILERRT_FUNCTION_ALIAS(__arm_sc_memmove, __arm_sc_memcpy) - +// This version uses FP registers. Use this only on targets with them +#if defined(__aarch64__) && __ARM_FP != 0 aricha

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-10 Thread Alexander Richardson via cfe-commits
@@ -238,7 +236,8 @@ END_COMPILERRT_OUTLINE_FUNCTION(__arm_sc_memcpy) DEFINE_COMPILERRT_FUNCTION_ALIAS(__arm_sc_memmove, __arm_sc_memcpy) - +// This version uses FP registers. Use this only on targets with them +#if defined(__aarch64__) && __ARM_FP != 0 aricha

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-10 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. LGTM, just one comment. https://github.com/llvm/llvm-project/pull/111235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-10 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/111235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-07 Thread Alexander Richardson via cfe-commits
@@ -10,15 +10,13 @@ // //===--===// +// clang-format off arichardson wrote: Why is this needed? Adding another newline should avoid the reordering. Alternatively, config.h should include st

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: libunwind changes LGTM, not quite sure about the compiler-rt part. https://github.com/llvm/llvm-project/pull/111235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-10-07 Thread Alexander Richardson via cfe-commits
@@ -6,7 +6,7 @@ #include "../assembly.h" -#ifdef __aarch64__ +#if defined(__aarch64__) && __ARM_FP != 0 arichardson wrote: Unless I've missed something, only memset uses the q registers? So memcpy should still be fine? https://github.com/llvm/llvm-project/

[clang] [llvm] [PowerPC][ISelLowering] Support -mstack-protector-guard=tls (PR #110928)

2024-10-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. This LGTM but would be good to have someone who actually knows PPC to also review it. https://github.com/llvm/llvm-project/pull/110928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [llvm] [PowerPC][ISelLowering] Support -mstack-protector-guard=tls (PR #110928)

2024-10-07 Thread Alexander Richardson via cfe-commits
@@ -5616,6 +5616,10 @@ class TargetLowering : public TargetLoweringBase { return true; } +protected: + // Simple interface for targets without a Module dependency arichardson wrote: There probably aren't that many overrides here? Maybe easiest to just

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-01 Thread Alexander Richardson via cfe-commits
@@ -12,7 +12,7 @@ // functions. We need to ensure that the return value is sign-extended in the // same way as GCC expects (since otherwise GCC-generated __builtin_isinf // returns true for finite 128-bit floating-point numbers). -#ifdef __aarch64__ +#if defined(__aarch64__) ||

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-01 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: I started reviewing this but all the unrelated formatting changes made this quite difficult. Would appreciate a minimal diff with just the changes that are needed for WASM. https://github.com/llvm/llvm-project/pull/79667 ___

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-01 Thread Alexander Richardson via cfe-commits
@@ -98,73 +89,58 @@ extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_pure_virtual(void); extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_deleted_virtual(void); // 3.3.2 One-time Construction API -#if defined(_LIBCXXABI_GUARD_ABI_ARM) -extern _LIBCXXABI_FUN

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [libunwind][libcxx][libcxxabi][compiler-rt-builtins] Fix Exception Handling build for wasm (PR #79667)

2024-10-01 Thread Alexander Richardson via cfe-commits
@@ -29,22 +29,21 @@ namespace __cxxabiv1 { +#if defined(__wasm__) +typedef void* (*__libcpp_exception_destructor_func)(void*); arichardson wrote: Could keep the existing comment here `// In Wasm, a destructor returns its argument` to explain why it is d

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-20 Thread Alexander Richardson via cfe-commits
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value << "sysreg global"; return; } +if (EffectiveTriple.isRISCV()) { + if (Value != "tls" && Value != "global") { ---

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/108942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >