r340522 - Update avr attributes test for output change in r340519

2018-08-23 Thread Alexander Richardson via cfe-commits
Author: arichardson Date: Thu Aug 23 03:21:36 2018 New Revision: 340522 URL: http://llvm.org/viewvc/llvm-project?rev=340522&view=rev Log: Update avr attributes test for output change in r340519 After this commit there is an addrspace(1) before the attribute #. Since these tests are only checking

r315871 - Convert clang::LangAS to a strongly typed enum

2017-10-15 Thread Alexander Richardson via cfe-commits
Author: arichardson Date: Sun Oct 15 11:48:14 2017 New Revision: 315871 URL: http://llvm.org/viewvc/llvm-project?rev=315871&view=rev Log: Convert clang::LangAS to a strongly typed enum Summary: Convert clang::LangAS to a strongly typed enum Currently both clang AST address spaces and target spec

[libcxx] r337824 - Stop wrapping __has_include in another macro

2018-07-24 Thread Alexander Richardson via cfe-commits
Author: arichardson Date: Tue Jul 24 05:40:56 2018 New Revision: 337824 URL: http://llvm.org/viewvc/llvm-project?rev=337824&view=rev Log: Stop wrapping __has_include in another macro Summary: This is not guaranteed to work since the characters after '__has_include(' have special lexing rules that

[libcxx] r325914 - Allow passing additional compiler/linker flags for the tests

2018-02-23 Thread Alexander Richardson via cfe-commits
Author: arichardson Date: Fri Feb 23 07:19:48 2018 New Revision: 325914 URL: http://llvm.org/viewvc/llvm-project?rev=325914&view=rev Log: Allow passing additional compiler/linker flags for the tests Summary: These flags can be specified using the CMake variables LIBCXX_TEST_LINKER_FLAGS and LIBCX

r335495 - Use Triple::isMIPS() instead of enumerating all Triples. NFC

2018-06-25 Thread Alexander Richardson via cfe-commits
Author: arichardson Date: Mon Jun 25 09:49:52 2018 New Revision: 335495 URL: http://llvm.org/viewvc/llvm-project?rev=335495&view=rev Log: Use Triple::isMIPS() instead of enumerating all Triples. NFC Reviewed By: atanasyan Differential Revision: https://reviews.llvm.org/D48549 Modified: cfe/

[clang] [mlir] [flang] [llvm] [lld] [ELF] Merge exportDynamic into versionId (PR #71272)

2023-11-06 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: This looks good to me, nice way of saving one of the bits. https://github.com/llvm/llvm-project/pull/71272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [flang] [lld] [mlir] [llvm] [ELF] Merge exportDynamic into versionId (PR #71272)

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

[flang] [clang] [lld] [mlir] [llvm] [ELF] Merge exportDynamic into versionId (PR #71272)

2023-11-06 Thread Alexander Richardson via cfe-commits
@@ -2518,9 +2521,9 @@ static void combineVersionedSymbol(Symbol &sym, sym.symbolKind = Symbol::PlaceholderKind; sym.isUsedInRegularObj = false; } else if (auto *sym1 = dyn_cast(&sym)) { -if (sym2->versionId > VER_NDX_GLOBAL -? config->versionDefinition

[mlir] [clang] [llvm] [flang] [lld] [ELF] Merge exportDynamic into versionId (PR #71272)

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

[mlir] [flang] [clang] [llvm] [lld] [ELF] Merge exportDynamic into versionId (PR #71272)

2023-11-07 Thread Alexander Richardson via cfe-commits
@@ -2518,9 +2521,9 @@ static void combineVersionedSymbol(Symbol &sym, sym.symbolKind = Symbol::PlaceholderKind; sym.isUsedInRegularObj = false; } else if (auto *sym1 = dyn_cast(&sym)) { -if (sym2->versionId > VER_NDX_GLOBAL -? config->versionDefinition

[flang] [clang] [mlir] [llvm] [lld] [ELF] Merge exportDynamic into versionId (PR #71272)

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

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 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] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. I'm happy with this as is but I'd wait for at least one other positive review before merging. https://github.com/llvm/llvm-project/pull/72040 ___ cfe-commits mailing list cfe-commits@lists.llv

[libunwind] [libunwind] introduce _LIBUNWIND_TRACE_DWARF_EVAL for increased baremetal friendliness (PR #72040)

2023-11-11 Thread Alexander Richardson via cfe-commits
@@ -223,6 +223,21 @@ } while (0) #endif +#define _LIBUNWIND_TRACING_DWARF_EVAL (0) arichardson wrote: Maybe it would be best to follow the same pattern as above and allow turning it on for debug builds? But seeing as it's always been hardcoded to false,

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

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

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. I would assume this is already transformed to memcpy but I guess it won't be for -O0 https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-11 Thread Alexander Richardson via cfe-commits
@@ -143,7 +143,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) { // Create a mock exception object for force unwinding. _Unwind_Exception ex; memset(&ex, '\0', sizeof(ex)); - strcpy((char *)&ex.exception_class, "CLNGUNW"); + memcpy(&ex.exception_class, "CLN

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-12 Thread Alexander Richardson via cfe-commits
@@ -143,7 +143,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callback, void *ref) { // Create a mock exception object for force unwinding. _Unwind_Exception ex; memset(&ex, '\0', sizeof(ex)); - strcpy((char *)&ex.exception_class, "CLNGUNW"); + memcpy(&ex.exception_class, "CLN

[libunwind] [libunwind] Remove unnecessary strcpy dependency (PR #72043)

2023-11-13 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/72043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix an inconsistent indentation (NFC) (PR #72314)

2023-11-14 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Making it consistent is good, but it sounds like we should update the .clang-format config file or reformat this whole file to not be indented. https://github.com/llvm/llvm-project/pull/72314 ___ cfe-commits m

[libunwind] [libunwind] Fix an inconsistent indentation (NFC) (PR #72314)

2023-11-14 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > Making it consistent is good, but it sounds like we should update the > > .clang-format config file or reformat this whole file to not be indented. > > I'm not sure what the clang-format policy for libunwind is. How about landing > this as is and updating `.clang-format`

[libunwind] [libunwind] Fix an inconsistent indentation (NFC) (PR #72314)

2023-11-14 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/72314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-11-15 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Gentle ping! Sorry for the delay - I was busy with the RISC-V summit last week, hoping to get to this PR later this week. https://github.com/llvm/llvm-project/pull/67860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

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

2023-11-20 Thread Alexander Richardson via cfe-commits
@@ -672,7 +671,7 @@ inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf, Dl_info dyldInfo; if (dladdr((void *)addr, &dyldInfo)) { if (dyldInfo.dli_sname != NULL) { - snprintf(buf, bufLen, "%s", dyldInfo.dli_sname); + strncpy(buf, dyldInfo.d

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

2023-11-20 Thread Alexander Richardson via cfe-commits
@@ -681,7 +680,7 @@ inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf, uint16_t nameLen; char *funcName = getFuncNameFromTBTable(addr, nameLen, offset); if (funcName != NULL) { -snprintf(buf, bufLen, "%.*s", nameLen, funcName); +strncpy(buf,

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

2023-11-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. Thanks! 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)

2023-11-20 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

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: All my comments have been resolved, thank you very much! https://github.com/llvm/llvm-project/pull/67166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-01 Thread Alexander Richardson via cfe-commits
@@ -121,6 +136,17 @@ def getStdFlag(cfg, std): AddCompileFlag(lambda cfg: getStdFlag(cfg, std)), ], ), +Parameter( +name="optimization", +choices=["none", "speed", "size"], +type=str, +help="The version of the standard

[libcxx] [llvm] [clang] [clang-tools-extra] [libc++] Allow running the test suite with optimizations (PR #68753)

2023-11-01 Thread Alexander Richardson via cfe-commits
@@ -87,6 +87,21 @@ def getStdFlag(cfg, std): return "-std=" + fallbacks[std] return None +def getSpeedOptimizationFlag(cfg): +if _isClang(cfg) or _isAppleClang(cfg) or _isGCC(cfg): +return "-O3" +elif _isMSVC(cfg): +return "/O2" +else: +

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-11-03 Thread Alexander Richardson via cfe-commits
@@ -43,6 +43,12 @@ #define LIBUNWIND_AVAIL #endif +#if defined(__SANITIZE_MEMORY__) || \ arichardson wrote: Sounds good. In that case I'll update the PR when I'm back in the office next Thursday. https://github.

[clang] [Clang][CodeGen] Stoping emitting alignment assumes for `align_{up,down}` (PR #71295)

2023-11-04 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/71295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [llvm] [clang] [clang-tools-extra] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-18 Thread Alexander Richardson via cfe-commits
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[llvm] [clang] [clang-tools-extra] [libunwind] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-19 Thread Alexander Richardson via cfe-commits
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[llvm] [clang] [clang-tools-extra] [libunwind] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-19 Thread Alexander Richardson via cfe-commits
@@ -2974,6 +2966,39 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[clang] [llvm] [libunwind] [clang-tools-extra] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-19 Thread Alexander Richardson via cfe-commits
@@ -2817,7 +2817,7 @@ bool UnwindCursor::setInfoForSigReturn(Registers_s390x &) { const pint_t pc = static_cast(this->getReg(UNW_REG_IP)); // The PC might contain an invalid address if the unwind info is bad, so // directly accessing it could cause a SIGSEGV. - if (!isRe

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-27 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. The commit message is slightly misleading, it appears there are some parts of the file that are actually used? https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits maili

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-27 Thread Alexander Richardson via cfe-commits
arichardson wrote: > The commit message is slightly misleading, it appears there are some parts of > the file that are actually used? Other than this, the change looks good to me. https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailin

[clang] [clang][CodeGen] Emit atomic IR instead of libcalls for misaligned po… (PR #73176)

2023-11-27 Thread Alexander Richardson via cfe-commits
arichardson wrote: When I first came across this code I found it quite surprising that both clang and LLVM need handling for atomic libcalls. I feel it would be a lot nicer if this could all be handled inside the LLVM backend logic. Would it also be possible to emit the unoptimized libcall fro

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-28 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > The commit message is slightly misleading, it appears there are some parts > > of the file that are actually used? > > As the commit message says, we only use > https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c > and not libunwind.cpp. We don't

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2023-11-28 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libunwind] [clang-tools-extra] [llvm] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. Just one question otherwise this looks good to me. https://github.com/llvm/llvm-project/pull/74791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[llvm] [libunwind] [clang-tools-extra] [clang] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

2023-12-20 Thread Alexander Richardson via cfe-commits
@@ -2974,6 +2966,37 @@ bool UnwindCursor::getFunctionName(char *buf, size_t bufLen, buf, bufLen, offset); } +#if defined(_LIBUNWIND_CHECK_LINUX_SIGRETURN) +template +bool UnwindCursor::isReadableAddr(const pint_t addr) const { + // T

[clang] [clang-tools-extra] [libunwind] [llvm] [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (PR #74791)

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

[clang] [clang] Differentiate between identifier and string EnumArgument (PR #68550)

2023-12-20 Thread Alexander Richardson via cfe-commits
@@ -886,7 +893,7 @@ def ARMInterrupt : InheritableAttr, TargetSpecificAttr { // MSP430Interrupt's, MipsInterrupt's and AnyX86Interrupt's spellings // must match. let Spellings = [GCC<"interrupt">]; - let Args = [EnumArgument<"Interrupt", "InterruptType", + let Args = [

[libunwind] [libunwind] Add length info for dynamic .eh_frame registration (PR #77185)

2024-01-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: While I think this is a reasonable change, I don't think we can change this function signature without breaking the ABI. So it probably needs to be a new function instead. https://github.com/llvm/llvm-project/pull/77185

[libunwind] [libunwind] Convert a few options from CACHE PATH to CACHE STRING (PR #77534)

2024-01-09 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/77534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [libcxxabi] [libclc] [libcxx] [flang] [clang] [libunwind] [compiler-rt] [libc] [lld] [lldb] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via cfe-commits
@@ -374,10 +376,10 @@ static __inline fp_t __compiler_rt_fmax(fp_t x, fp_t y) { #endif } -#elif defined(QUAD_PRECISION) && defined(CRT_HAS_TF_MODE) +#elif defined(QUAD_PRECISION) // The generic implementation only works for ieee754 floating point. For other // floating point

[libc] [lldb] [clang-tools-extra] [libclc] [llvm] [libunwind] [clang] [lld] [compiler-rt] [libcxx] [libcxxabi] [flang] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via cfe-commits
@@ -189,11 +189,15 @@ typedef long double tf_float; #define CRT_LDBL_IEEE_F128 #endif #define TF_C(x) x##L -#elif __LDBL_MANT_DIG__ == 113 -// Use long double instead of __float128 if it matches the IEEE 128-bit format. +#elif __LDBL_MANT_DIG__ == 113 ||

[llvm] [libunwind] [compiler-rt] [lld] [clang-tools-extra] [libc] [flang] [libcxx] [clang] [lldb] [libclc] [libcxxabi] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via cfe-commits
@@ -15,8 +15,6 @@ #include "int_lib.h" #include "int_math.h" -#if defined(CRT_HAS_TF_MODE) arichardson wrote: I'm not sure if we support architectures without a "tf" floating point type. To be safe I believe we still need a guard here since this file is comp

[flang] [clang-tools-extra] [lld] [llvm] [libcxx] [compiler-rt] [clang] [libcxxabi] [libc] [libunwind] [lldb] [libclc] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via cfe-commits
@@ -13,8 +13,6 @@ #define QUAD_PRECISION #include "fp_lib.h" -#if defined(CRT_HAS_TF_MODE) arichardson wrote: I'd suggest replacing this with CRT_HAS_F128 as noted below (unless you're will to audit all current uses of CRT_HAS_TF_MODE since that currently is

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-17 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Thanks, this looks great once all of @jrtc27's comments have been addressed. https://github.com/llvm/llvm-project/pull/85460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[libunwind] [libunwind] Tweak tests for musl support. (PR #85097)

2024-03-21 Thread Alexander Richardson via cfe-commits
@@ -11,20 +11,27 @@ // Basic test for float registers number are accepted. -#include #include #include #include +// Using __attribute__((section("main_func"))) is Linux specific, but then arichardson wrote: Nit: This is not specific to Linux it is s

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-21 Thread Alexander Richardson via cfe-commits
@@ -792,13 +792,14 @@ EncompassingIntegerType(ArrayRef Types) { Value *CodeGenFunction::EmitVAStartEnd(Value *ArgValue, bool IsStart) { Intrinsic::ID inst = IsStart ? Intrinsic::vastart : Intrinsic::vaend; - return Builder.CreateCall(CGM.getIntrinsic(inst), ArgValue); + re

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-22 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. LGTM thanks! Please wait for @jrtc27 to also approve before committing though. https://github.com/llvm/llvm-project/pull/85460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

2024-03-22 Thread Alexander Richardson via cfe-commits
arichardson wrote: CI looks unhappy, mlir also seems to need updates: MLIR :: Target/LLVMIR/llvmir.mlir MLIR :: mlir-cpu-runner/x86-varargs.mlir https://github.com/llvm/llvm-project/pull/85460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[libunwind] [libunwind] Compile the asm as well as the C++ source (PR #86351)

2024-03-22 Thread Alexander Richardson via cfe-commits
arichardson wrote: It might make sense to restore the `message(FATAL_ERROR)` since that is any easy mistake to make considering it used to be the default way of building libunwind. https://github.com/llvm/llvm-project/pull/86351 ___ cfe-commits maili

[clang] [llvm] [mlir] [CodeGen][LLVM] Make the `va_list` related intrinsics generic. (PR #85460)

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

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-06 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,122 @@ +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +void bar(int &Data) {} +// CHECK-DAG: define dso_local void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr noundef nonnull align 4 dereferenceable(4) % +voi

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-06 Thread Alexander Richardson via cfe-commits
@@ -285,6 +289,20 @@ void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::GlobalValue *GV, bool NVPTXTargetCodeGenInfo::shouldEmitStaticExternCAliases() const { return false; } + +llvm::Constant * +NVPTXTargetCodeGenInfo::getNullPointer(const CodeGen::CodeGenModule &CGM, +

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-07 Thread Alexander Richardson via cfe-commits
@@ -285,6 +289,20 @@ void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::GlobalValue *GV, bool NVPTXTargetCodeGenInfo::shouldEmitStaticExternCAliases() const { return false; } + +llvm::Constant * +NVPTXTargetCodeGenInfo::getNullPointer(const CodeGen::CodeGenModule &CGM, +

[clang] [NVPTX][AMDGPU][CodeGen] Fix `local_space nullptr` handling for NVPTX and local/private `nullptr` value for AMDGPU. (PR #78759)

2024-02-07 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,122 @@ +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsycl-is-device -disable-llvm-passes -emit-llvm %s -o - | FileCheck %s +void bar(int &Data) {} +// CHECK-DAG: define dso_local void @[[RAW_REF:[a-zA-Z0-9_]+]](ptr noundef nonnull align 4 dereferenceable(4) % +voi

[libunwind] Use relative includes to allow source-based dependencies without `-I` (PR #80443)

2024-02-08 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: It does seem like all other libunwind sources use `#include "` to find headers that are part of libunwind, so I think doing it for the includes that are installed should also be fine. I don't think installing these headers into separate directories and

[clang] [clang-tools-extra] [compiler-rt] [flang] [libclc] [libcxx] [lld] [lldb] [llvm] [NFC] Remove trailing whitespace across all non-test related files (PR #82838)

2024-02-23 Thread Alexander Richardson via cfe-commits
arichardson wrote: This will cause huge merge conflicts for all downstreams. While they are easy to resolve it can be quite annoying. I think we should just do this as part of the global clang-format. https://github.com/llvm/llvm-project/pull/82838 _

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-11 Thread Alexander Richardson via cfe-commits
@@ -33,9 +33,9 @@ void test_i32_atomics(_Atomic(int32_t) * a, int32_t b) { } void test_i64_atomics(_Atomic(int64_t) * a, int64_t b) { - // LA32: call i64 @__atomic_load_8 - // LA32: call void @__atomic_store_8 - // LA32: call i64 @__atomic_fetch_add_8 + // LA32: load atomi

[compiler-rt] [libcxxabi] [lld] [lldb] [clang] [llvm] [libc] [libclc] [libunwind] [libcxx] [clang-tools-extra] [flang] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. Thanks this looks good to me now and should not change anything for other targets. https://github.com/llvm/llvm-project/pull/77554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[compiler-rt] [lld] [clang-tools-extra] [libclc] [llvm] [libcxx] [libcxxabi] [lldb] [flang] [libc] [libunwind] [clang] [builtins] Generate __multc3 for z/OS (PR #77554)

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

[llvm] [clang-tools-extra] [libclc] [libc] [lld] [lldb] [clang] [libcxx] [libcxxabi] [flang] [libunwind] [compiler-rt] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-12 Thread Alexander Richardson via cfe-commits
@@ -374,10 +376,10 @@ static __inline fp_t __compiler_rt_fmax(fp_t x, fp_t y) { #endif } -#elif defined(QUAD_PRECISION) && defined(CRT_HAS_TF_MODE) +#elif defined(QUAD_PRECISION) arichardson wrote: Looks like this was actually required. Probably needs to be c

[libunwind] [libunwind] Move errno.h and signal.h includes under the block where they're needed (PR #78054)

2024-01-13 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. https://github.com/llvm/llvm-project/pull/78054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-01-15 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Overall this looks great to me, very happy to see reduced duplication between clang and llvm. It would be great if we could just emit the atomic IR in all cases but unfortunately non-power-of-two sizes result in a verifier error. We could probably emi

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-18 Thread Alexander Richardson via cfe-commits
@@ -43,6 +43,12 @@ #define LIBUNWIND_AVAIL #endif +#if defined(__SANITIZE_MEMORY__) || \ arichardson wrote: Ah I assumed it was needed for GCC since it doesn't have __has_feature(). https://github.com/llvm/llvm-p

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-18 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67860 >From e39c568ba557fbca5d3ef17f3d4f4d74f15e8205 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 29 Sep 2023 13:25:39 -0700 Subject: [PATCH 1/2] [libunwind] Fix running tests with MSan In order to ru

[libunwind] [libunwind][test] Avoid calling back into libunwind on sanitizer errors (PR #67861)

2023-10-20 Thread Alexander Richardson via cfe-commits
@@ -28,6 +28,14 @@ if @LIBUNWIND_USES_ARM_EHABI@: if not @LIBUNWIND_ENABLE_THREADS@: config.available_features.add('libunwind-no-threads') +config.extra_executor_env = "" arichardson wrote: Agreed that would be way better, I'll see if I can get back to th

[libunwind] [libunwind][test] Avoid calling back into libunwind on sanitizer errors (PR #67861)

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

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67201 >From 6d650b781080d46ccae02793529cf63b18859f3f Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 6 Sep 2023 11:41:56 -0700 Subject: [PATCH 1/4] [libunwind][libc++][libc++abi] Add cross-compilation fl

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-20 Thread Alexander Richardson via cfe-commits
arichardson wrote: Debugging shows that the reason this is failing on the clang-cl bots is that the CMAKE_CXX_FLAGS_INIT are using the MSVC syntax but we pass --driver-mode=g++ explicitly: ``` lit: C:\ws\src\libcxx\utils\libcxx\test\format.py:55: note: Command ["'C:/Program Files/LLVM/bin/cla

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-20 Thread Alexander Richardson via cfe-commits
@@ -45,10 +45,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', -'-nostdinc++ -I %{include} -I %{libcxx}/test/support' +'@CMAKE_CXX_FLAGS_

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread Alexander Richardson via cfe-commits
@@ -6411,6 +6411,40 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +if (isa(Op0) || isa(Op1)) + return PoisonValue::get(Op0->getType()); + +

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

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

[clang] [InstCombine] Add combines/simplifications for `llvm.ptrmask` (PR #67166)

2023-10-27 Thread Alexander Richardson via cfe-commits
@@ -6411,6 +6411,40 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +if (isa(Op0) || isa(Op1)) + return PoisonValue::get(Op0->getType()); + +

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-09-22 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/67201 There is currently only limited support for passing target-specific flags (e.g. -mabi= or -march=) to the testsuites if you don't have a compiler (or wrapper script) that defaults to the expected flags. Howe

[libunwind] [libunwind] Pass -Wl,--export-dynamic on all supported platforms (PR #67205)

2023-09-22 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/67205 I was trying to run the tests on FreeBSD and noticed that we weren't printing symbol names. It turns out this is because of the missing -Wl,--export dynamic flag. Instead of hardcoding the name of the flag a

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-09-25 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Is there a reason why _all_ configurations shouldn't be doing this? I think it would be good if all of them did it, the reason I didn't is that I limited it to the ones I can test locally. Seeing as there is probably CI coverage for all of the configs, should I try updatin

[libunwind] [libunwind] Pass -Wl,--export-dynamic on all supported platforms (PR #67205)

2023-09-25 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67205 >From 27c0526c4b21e2b19eeeae3c23928421437b885a Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 22 Sep 2023 16:11:49 -0700 Subject: [PATCH] [libunwind] Pass -Wl,--export-dynamic on all supported pla

[libunwind] [libunwind] Pass -Wl,--export-dynamic on all supported platforms (PR #67205)

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

[clang] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/66545 >From eb6f23cbc308bb30fd78094aba4259e3aae6657c Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 25 Sep 2023 08:22:27 -0700 Subject: [PATCH] [libunwind][libc++][libc++abi] Allow overriding the executo

[libunwind] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/66545 >From eb6f23cbc308bb30fd78094aba4259e3aae6657c Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 25 Sep 2023 08:22:27 -0700 Subject: [PATCH] [libunwind][libc++][libc++abi] Allow overriding the executo

[libunwind] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
@@ -330,5 +330,14 @@ def getModuleFlag(cfg, enable_modules): AddCompileFlag("-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES"), ], ), +Parameter( arichardson wrote: Done now, tested both the default and the case where LIBCXX_EXECUTOR is set.

[clang] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
@@ -330,5 +330,14 @@ def getModuleFlag(cfg, enable_modules): AddCompileFlag("-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES"), ], ), +Parameter( arichardson wrote: Done now, tested both the default and the case where LIBCXX_EXECUTOR is set.

[libunwind] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
@@ -134,3 +134,8 @@ ABI Affecting Changes Build System Changes + +- The ``LIBCXX_EXECUTOR`` CMake variable has been deprecated. If you are relying on this, the new replacement + is either passing ``-Dexecutor=...`` to `llvm-lit`` or to make it persistent

[clang] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
@@ -134,3 +134,8 @@ ABI Affecting Changes Build System Changes + +- The ``LIBCXX_EXECUTOR`` CMake variable has been deprecated. If you are relying on this, the new replacement + is either passing ``-Dexecutor=...`` to `llvm-lit`` or to make it persistent

[libunwind] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/66545 >From eb6f23cbc308bb30fd78094aba4259e3aae6657c Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 25 Sep 2023 08:22:27 -0700 Subject: [PATCH 1/2] [libunwind][libc++][libc++abi] Allow overriding the ex

[clang] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-25 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/66545 >From eb6f23cbc308bb30fd78094aba4259e3aae6657c Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Mon, 25 Sep 2023 08:22:27 -0700 Subject: [PATCH 1/2] [libunwind][libc++][libc++abi] Allow overriding the ex

[libunwind] [libunwind][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-09-25 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > I think it would be good if all of them did it, the reason I didn't is that > > I limited it to the ones I can test locally. Seeing as there is probably CI > > coverage for all of the configs, should I try updating the remaining ones? > > Yes, I think it makes sense for

[libunwind] [libunwind] Pass -Wl,--export-dynamic on all supported platforms (PR #67205)

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

[libunwind] [libunwind] Pass -Wl,--export-dynamic on all supported platforms (PR #67205)

2023-09-25 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Is this really desirable? It can actually break applications as it changes > ELF semantics. I agree that it's not generally desirable, but this is only for the libunwind tests (which expect these semantics). https://github.com/llvm/llvm-project/pull/67205

[libunwind] [libunwind] Pass -Wl,--export-dynamic on all supported platforms (PR #67205)

2023-09-25 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Can you as a small follow-up just update the comment to include that part? > E.g. > Will do. > ``` > # On ELF platforms, link tests with -Wl,--export-dynamic if supported by the > linker. > ``` > > Side note: the much older way for doing this is actually `-rdynamic`. It

[libunwind] [libunwind][nfc] Avoid type warning of debug printf (PR #67390)

2023-09-26 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Could also use %p instead of `0x% Pri*`and cast the `uintptr_t` to `void *`? That would avoid the need for the new macros. https://github.com/llvm/llvm-project/pull/67390 ___ cfe-commits mailing list cfe-commi

[libunwind] [libunwind][nfc] Avoid type warning of debug printf (PR #67390)

2023-09-26 Thread Alexander Richardson via cfe-commits
arichardson wrote: Or alternatively use PRIxPTR unconditionally, using PRIuPTR with 0x-prefixed outputs is super confusing https://github.com/llvm/llvm-project/pull/67390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [libc++][lit] Allow overriding the executor for tests (PR #66545)

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

  1   2   3   4   >