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

2023-09-26 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson resolved 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

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

2023-09-26 Thread Alexander Richardson via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

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

2023-09-26 Thread Alexander Richardson via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

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

2023-09-26 Thread Alexander Richardson via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

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

2023-09-26 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-09-26 Thread Alexander Richardson via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

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

2023-09-26 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson resolved 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-09-26 Thread Alexander Richardson via cfe-commits
@@ -6397,6 +6397,48 @@ static Value *simplifyBinaryIntrinsic(Function *F, Value *Op0, Value *Op1, return Constant::getNullValue(ReturnType); break; } + case Intrinsic::ptrmask: { +// Fail loudly in case this is ever changed. +// TODO: If vector types are s

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

2023-09-26 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. Change LGTM assuming CI is also happy. https://github.com/llvm/llvm-project/pull/67390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

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

2023-09-26 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson > > here is a problem with your changes when building the libraries on the > windows cross toolchain builders > > * https://lab.llvm.org/buildbot/#/builders/60/builds/14086 > * https://lab.llvm.org/buildbot/#/builders/119/builds/15283 > > https://lab.llvm.org

[clang] Diagnose problematic uses of constructor/destructor attribute (PR #67360)

2023-09-26 Thread Alexander Richardson via cfe-commits
arichardson wrote: With regard to arguments: I know that the [FreeBSD runtime linker](https://github.com/freebsd/freebsd-src/blob/d06328c37bbcf3d3d3c7601372d29237996a6f6a/libexec/rtld-elf/aarch64/rtld_machdep.h#L59) (and according to https://stackoverflow.com/a/46331112 also glibc) passes argc

[clang] Diagnose problematic uses of constructor/destructor attribute (PR #67360)

2023-09-27 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > With regard to arguments: I know that the [FreeBSD runtime > > linker](https://github.com/freebsd/freebsd-src/blob/d06328c37bbcf3d3d3c7601372d29237996a6f6a/libexec/rtld-elf/aarch64/rtld_machdep.h#L59) > > (and according to https://stackoverflow.com/a/46331112 also glibc)

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

2023-09-27 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson > > here is a problem with your changes when building the libraries on the > windows cross toolchain builders > > * https://lab.llvm.org/buildbot/#/builders/60/builds/14086 > * https://lab.llvm.org/buildbot/#/builders/119/builds/15283 > > https://lab.llvm.org

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-28 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/67691 Since 78d649a417b48cb8a2ba2e755f0e7c8fb8b1bb83 the recommended way to pass an executor is to use the _TEST_PARAMS variable, which means we now pass more complicated value (including ones that may contain mul

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-28 Thread Alexander Richardson via cfe-commits
arichardson wrote: @vvereschaka I tested this locally by adding a parameter with quotes to my CMake invocation, so it should hopefully work. Could you please test if this fixes the builder? https://github.com/llvm/llvm-project/pull/67691 ___ cfe-comm

[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-28 Thread Alexander Richardson via cfe-commits
arichardson wrote: @vvereschaka I tested this locally by adding a parameter with quotes to my CMake invocation, so it should hopefully work. Could you please test if this fixes the builder? https://github.com/llvm/llvm-project/pull/67691 ___ cfe-comm

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

2023-09-29 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/67860 In order to run tests with MSan we have silence two false-positives: First, we have to tell the runtime that __unw_getcontext actually populates the buffer with initialized data. Ideally we would call __msan

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

2023-09-29 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/67861 The libunwind tests currently trigger MSan diagnostics, but while printing those diagnostics MSan calls back into libunwind to print a stack trace. And then this stack trace triggers another nested MSan faul

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67691 >From 70cfa2f35c152528e6c6e05690ce079c71169fc7 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 29 Sep 2023 09:03:01 -0700 Subject: [PATCH 1/2] [runtimes] Factor out serialize_lit_param to a separate

[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67691 >From 70cfa2f35c152528e6c6e05690ce079c71169fc7 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 29 Sep 2023 09:03:01 -0700 Subject: [PATCH 1/2] [runtimes] Factor out serialize_lit_param to a separate

[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

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

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

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

[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson, any progress?! Sorry thought I'd pushed the latest version earlier, turns out there was an error during the push. Updated now. https://github.com/llvm/llvm-project/pull/67691 ___ cfe-commits mailing list cfe-commits

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson, any progress?! Sorry thought I'd pushed the latest version earlier, turns out there was an error during the push. Updated now. https://github.com/llvm/llvm-project/pull/67691 ___ cfe-commits mailing list cfe-commits

[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
@@ -151,6 +151,10 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS find_package(Python3 COMPONENTS Interpreter) +set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_TEST_PARAMS "${RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_TEST_PARAMS}" CACHE INTERNAL

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

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

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
@@ -151,6 +151,10 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS find_package(Python3 COMPONENTS Interpreter) +set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_TEST_PARAMS "${RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_TEST_PARAMS}" CACHE INTERNAL

[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

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

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson , works fine on the builders locally. Thank you. Would yo merge > these changes if they are ready? Thanks for testing! I'll merge these changes as soon as @ldionne is happy with the new macros. Once that happens I'll push the first commit manually and then me

[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @arichardson , works fine on the builders locally. Thank you. Would yo merge > these changes if they are ready? Thanks for testing! I'll merge these changes as soon as @ldionne is happy with the new macros. Once that happens I'll push the first commit manually and then me

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

2023-10-02 Thread Alexander Richardson via cfe-commits
arichardson wrote: Since the langref definition is based on GEP, can we use index width instead of pointer width? If you disagree with this, it would still be good if you could add a test where the datalayout has index width < pointer width to show the current semantics. https://github.com/ll

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

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

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

2023-10-02 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/67861 >From 1bd6aa67df58f4becff8fbb1abdb2a244db58e94 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 29 Sep 2023 11:53:11 -0700 Subject: [PATCH] [libunwind][test] Avoid calling back into libunwind on san

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

2023-10-02 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] [libunwind] Fix running tests with MSan In order to run te

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

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

[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-10-04 Thread Alexander Richardson via cfe-commits
arichardson wrote: > @ldionne @arichardson , the problem is still there for more than 10 days > already. Do you guys plan to fix it! I am waiting for @ldionne to approve this PR. https://github.com/llvm/llvm-project/pull/67691 ___ cfe-commits mailing

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

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

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

2023-10-06 Thread Alexander Richardson via cfe-commits
@@ -44,12 +44,8 @@ BACKDEPLOYMENT_PARAMETERS = [ 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/su

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

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

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

2023-10-10 Thread Alexander Richardson via cfe-commits
arichardson wrote: > What is the nested MSAN fault? Wouldn't fixing that be a better way to handle > the situation? Currently there are missing annotations for __unw_getcontext so MSan thinks there are unintialized reads inside libunwind. The underlying issues is fixed in #67860 but if we eve

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

2023-10-10 Thread Alexander Richardson via cfe-commits
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL; extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL; +#ifdef LIBUNWIND_HAVE_MSAN +//

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

2023-10-10 Thread Alexander Richardson via cfe-commits
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL; extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL; +#ifdef LIBUNWIND_HAVE_MSAN +//

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/68813 It previously took a start+end pint_t, but all but one callsite were actually passing start+length arguments. This should not have any functional change since the end argument is almost always ignored. I not

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/68815 I was running the tests with baremetal picolibc which has a linker script that __eh_frame_start==__eh_frame_end (not equal to zero) in case there is no .eh_frame_hdr. I noticed that libunwind was trying to rea

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
@@ -53,8 +53,21 @@ template class EHHeaderParser { template bool EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, -pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo) { +size_t ehHdrSize, EHHeaderIn

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
@@ -53,8 +53,21 @@ template class EHHeaderParser { template bool EHHeaderParser::decodeEHHdr(A &addressSpace, pint_t ehHdrStart, -pint_t ehHdrEnd, EHHeaderInfo &ehHdrInfo) { +size_t ehHdrSize, EHHeaderIn

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/68813 >From ff360ee7f304424dd0d12d00b8c0ba6801241410 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 11 Oct 2023 08:34:55 -0700 Subject: [PATCH] [libunwind] Fix wrong end argument passed to decodeEHHdr()

[libunwind] [libunwind] Consistently pass start+length to decodeEHHdr() (PR #68813)

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

[libunwind] [libunwind] Fix wrong end argument passed to decodeEHHdr() (PR #68813)

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

[libunwind] [libunwind] Fix wrong end argument passed to decodeEHHdr() (PR #68813)

2023-10-11 Thread Alexander Richardson via cfe-commits
arichardson wrote: > Can we merge this into #68815 please? I'd like to keep the two commits separate since they are addressing different bugs. https://github.com/llvm/llvm-project/pull/68813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[libunwind] [libunwind] Fix wrong end argument passed to decodeEHHdr() (PR #68813)

2023-10-11 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > Can we merge this into #68815 please? > > I'd like to keep the two commits separate since they are addressing different > bugs. This would be a lot easier if I could chose rebase+merge in the PR flow. https://github.com/llvm/llvm-project/pull/68813 _

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/68815 >From ff360ee7f304424dd0d12d00b8c0ba6801241410 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 11 Oct 2023 08:34:55 -0700 Subject: [PATCH 1/2] [libunwind] Fix wrong end argument passed to decodeEHH

[libunwind] [libunwind] Fix wrong end argument passed to decodeEHHdr() (PR #68813)

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

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/68815 >From 63415241cd457cd4bcd0661e077b9f8c48e246e2 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 11 Oct 2023 08:52:45 -0700 Subject: [PATCH] [libunwind] Avoid reading OOB for non-existent .eh_frame_hd

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson updated https://github.com/llvm/llvm-project/pull/68815 >From 5d4e2bc5570f9fbcdebff2532370ad21f5cef2bb Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 11 Oct 2023 08:52:45 -0700 Subject: [PATCH] [libunwind] Avoid reading OOB for non-existent .eh_frame_hd

[libunwind] [libunwind] Avoid reading OOB for non-existent .eh_frame_hdr (PR #68815)

2023-10-11 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/68815 ___ 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-10-11 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][libc++][libc++abi] Add cross-compilation flags to tests (PR #67201)

2023-10-11 Thread Alexander Richardson via cfe-commits
arichardson wrote: > This would look good to me, but we seem to be failing the Windows tests! Unfortunately I can't see what's going wrong there and I don't have an easy way of reproducing it. I'll try to add some debugging code to this PR in the coming days. https://github.com/llvm/llvm-proj

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

2023-10-16 Thread Alexander Richardson via cfe-commits
arichardson wrote: > > Since the langref definition is based on GEP, can we use index width > > instead of pointer width? If you disagree with this, it would still be good > > if you could add a test where the datalayout has index width < pointer > > width to show the current semantics. > > A

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

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

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

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

[libunwind] [libcxx][libcxxabi][libunwind] Support target-specific flags for tests (PR #65517)

2023-09-13 Thread Alexander Richardson via cfe-commits
arichardson wrote: The problem is that we end up with a combinatoric explosion of config files for all the different ABIs that can be used. Would you be open to having the cmake-bridge inject CMAKE_CXX_FLAGS_INIT/CMAKE_EXE_LINKER_FLAGS_INIT (which should be empty unless you use a toolchain fi

[clang] [update_cc_test_checks] Use lit's shell to run commands (PR #65333)

2023-09-05 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson created https://github.com/llvm/llvm-project/pull/65333: I was trying to update a test that redirected stderr to a file and hit errors because the `2>%t.out` was being passed as a positional argument to clang. Instead of re-implementing basic shell parsing in this

[clang] [update_cc_test_checks] Use lit's shell to run commands (PR #65333)

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

[clang] [update_cc_test_checks] Use lit's shell to run commands (PR #65333)

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

[clang] [update_cc_test_checks] Use lit's shell to run commands (PR #65333)

2023-09-05 Thread Alexander Richardson via cfe-commits
arichardson wrote: Looks like only squash and merge is possible here, so I'll commit the baseline test separately before landing this. https://github.com/llvm/llvm-project/pull/65333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [update_cc_test_checks] Use lit's shell to run commands (PR #65333)

2023-09-06 Thread Alexander Richardson via cfe-commits
@@ -34,29 +35,22 @@ } -def get_line2func_list(args, clang_args): +def get_line2func_list(clang_cmd: Command): ret = collections.defaultdict(list) # Use clang's JSON AST dump to get the mangled name -json_dump_args = [args.clang] + clang_args + ["-fsyntax-only",

[clang] [update_cc_test_checks] Use lit's shell to run commands (PR #65333)

2023-09-06 Thread Alexander Richardson via cfe-commits
@@ -306,52 +276,79 @@ def main(): run_list = [] line2func_list = collections.defaultdict(list) -subs = { -"%s": ti.path, -"%t": tempfile.NamedTemporaryFile().name, -"%S": os.path.dirname(ti.path), -} +

[libunwind] [libcxx][libcxxabi][libunwind] Support target-specific flags for tests (PR #65517)

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

[libunwind] [libcxx][libcxxabi][libunwind] Support target-specific flags for tests (PR #65517)

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

[libcxx] r318144 - Rename identifiers named `__output`

2017-11-14 Thread Alexander Richardson via cfe-commits
Author: arichardson Date: Tue Nov 14 03:14:25 2017 New Revision: 318144 URL: http://llvm.org/viewvc/llvm-project?rev=318144&view=rev Log: Rename identifiers named `__output` Summary: In the CHERI clang compiler __output and __input are keywords and therefore we can't compile libc++ with our compi

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -4656,14 +4656,14 @@ static void InitCatchParam(CodeGenFunction &CGF, auto catchRD = CatchType->getAsCXXRecordDecl(); CharUnits caughtExnAlignment = CGF.CGM.getClassPointerAlignment(catchRD); - llvm::Type *PtrTy = CGF.UnqualPtrTy; // addrspace 0 ok ari

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -51,9 +51,11 @@ struct CodeGenTypeCache { llvm::IntegerType *PtrDiffTy; }; + /// unqualified void* + llvm::PointerType *UnqualPtrTy; arichardson wrote: I'd argue we should just remove this variable, and the few cases that actually want AS0 can cal

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Commit title needs updating to only refer to used metadata. A few wording suggestions inline. https://github.com/llvm/llvm-project/pull/93601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

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

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -2922,18 +2922,21 @@ static void emitUsed(CodeGenModule &CGM, StringRef Name, if (List.empty()) return; + // We unconditionally use unqualified pointers - this is intentional as these arichardson wrote: ```suggestion // We unconditionally use AS0

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -8642,8 +8642,9 @@ The '``llvm.used``' Global Variable The ``@llvm.used`` global is an array which has :ref:`appending linkage `. This array contains a list of pointers to named global variables, functions and aliases which may optionally -have a pointer cast formed of bitca

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

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

[clang] [llvm] [clang][CodeGen] `used` globals && the payloads for global ctors & dtors are globals (PR #93601)

2024-06-05 Thread Alexander Richardson via cfe-commits
@@ -2047,9 +2047,9 @@ void CodeGenModule::EmitCtorList(CtorList &Fns, const char *GlobalName) { llvm::Type *CtorPFTy = llvm::PointerType::get(CtorFTy, TheModule.getDataLayout().getProgramAddressSpace()); - // Get the type of a ctor entry, { i32, void ()*, i8* }. + /

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. This looks fine to me now, but I'd suggest a TODO comment that UnqualPtrTy should be removed in the future. https://github.com/llvm/llvm-project/pull/94388 ___ cfe-commits mailing list cfe-com

[clang] [clang][CodeGen] Make `UnqualPtrTy` truly unqualified (PR #94388)

2024-06-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. Ah I did not realize there were so many uses remaining. I that case those probably need auditing/changing before this change can land. https://github.com/llvm/llvm-project/pull/94388 _

[clang] [llvm] [clang][CodeGen] `used` globals are fake (PR #93601)

2024-06-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. LGTM with the outstanding comments addressed. https://github.com/llvm/llvm-project/pull/93601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-20 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Since I believe the CMake minimum version supports this, I don't see why we shouldn't submit this cleanup. Whether to change the flag detection logic can be a separate discussion IMO. https://github.com/llvm/llvm-project/pull/96171

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

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

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-05-31 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson approved this pull request. In the past I've cleaned up some local unnecessary REQUIRES: foo-registered-target in a downstream fork, good to see this being fixed upstream as well. I often build only a subset of targets so it's good to see more test coverage for t

[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-05-31 Thread Alexander Richardson via cfe-commits
@@ -1,6 +1,4 @@ // REQUIRES: system-linux arichardson wrote: Unrelated, but I don't see why this would fail on e.g. a FreeBSD host. Maybe it should be !WINDOWS? Although that should also be handled by REQUIRES: shell https://github.com/llvm/llvm-project/pull/9

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -2216,7 +2216,7 @@ static llvm::Value *EmitTypeidFromVTable(CodeGenFunction &CGF, const Expr *E, } llvm::Value *CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) { - llvm::Type *PtrTy = llvm::PointerType::getUnqual(getLLVMContext()); + llvm::Type *PtrTy = Int8Pt

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. The code change itself looks good to me and will be helpful for e.g. the CHERI fork. However, I don't think copy-pasting tests is a good strategy it would be much cleaner to just add a new RUN line to the existing tests. h

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

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

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -I%S %s -triple spirv64-unknown-unknown -fsycl-is-device -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s +struct A { virtual void f(); }; +struct B : A { }; + +// CHECK: {{define.*@_Z1fP1A}} +// CHECK-SAME: personality ptr @__gxx

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fsycl-is-device -std=c++20 %s -emit-llvm -o - | FileCheck %s + +struct S { char buf[32]; }; arichardson wrote: Same here, and I can see that the two copies are out-of sync. Would be good to m

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -I%S %s -triple spirv64-unknown-unknown -fsycl-is-device -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s arichardson wrote: Could you use update_cc_test_checks --check-globals here to just check the whole functi

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -366,7 +366,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth()); IntPtrTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getMaxPointerWidth()); - Int8PtrTy = llvm::PointerType::get(LL

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

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

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-24 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 %s -triple spirv64-unknown-unknown -fsycl-is-device -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s arichardson wrote: Instead of duplicating all these files, could you add one additional RUN: line to

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-29 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,288 @@ +// RUN: %clang_cc1 %s -triple=spirv64-unknown-unknown -fsycl-is-device -std=c++11 -emit-llvm -o %t.ll -O1 -disable-llvm-passes -fms-extensions -fstrict-vtable-pointers arichardson wrote: This test should be merged with the existing address-sp

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

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

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-29 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,288 @@ +// RUN: %clang_cc1 %s -triple=spirv64-unknown-unknown -fsycl-is-device -std=c++11 -emit-llvm -o %t.ll -O1 -disable-llvm-passes -fms-extensions -fstrict-vtable-pointers +// FIXME: Assume load should not require -fstrict-vtable-pointers + +// RUN: FileCheck --ch

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-29 Thread Alexander Richardson via cfe-commits
@@ -1370,7 +1370,7 @@ let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrWillReturn] in { // The result of eh.typeid.for depends on the enclosing function, but inside a // given function it is 'const' and may be CSE'd etc. -def int_eh_typeid_for : Intrinsic<[llvm_i32_ty],

[clang] [llvm] [mlir] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-29 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson commented: Spotted one more duplicate test, otherwise looks good to me with the reworded TODO comment suggestion. https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

<    1   2   3   4   >