[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

2024-06-22 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I suspect this is the root cause that some modules related test are failing > on armv8-quick. It passes with commit > [12c0281](https://github.com/llvm/llvm-project/commit/12c0281f8c73bc1aa20d1517357e0e12c3f8bb4e) > >

[clang] f3005d5 - [Serialization] Change input file content hash from size_t to uint64_t

2024-06-22 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-22T14:21:36-07:00 New Revision: f3005d5b86ca947977f6056552b2a4648b9f0460 URL: https://github.com/llvm/llvm-project/commit/f3005d5b86ca947977f6056552b2a4648b9f0460 DIFF: https://github.com/llvm/llvm-project/commit/f3005d5b86ca947977f6056552b2a4648b9f0460.diff

[clang] f5b93ae - [clang] Fix -Wsign-compare in 32-bit builds

2024-06-22 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-22T13:40:05-07:00 New Revision: f5b93ae5884dd72bd145576344e4e685cf5e URL: https://github.com/llvm/llvm-project/commit/f5b93ae5884dd72bd145576344e4e685cf5e DIFF: https://github.com/llvm/llvm-project/commit/f5b93ae5884dd72bd145576344e4e685cf5e.diff

[clang] [PAC][clang][Driver] Add signed GOT flag (PR #96160)

2024-06-21 Thread Fangrui Song via cfe-commits
MaskRay wrote: Do we want a lot of `-fptrauth-xxx` instead of `-fptrauth-something=xxx,yyy,zzz`? https://github.com/llvm/llvm-project/pull/96160 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [PPC][InlineASM] Mark the 'a' constraint as unsupported (PR #96109)

2024-06-21 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/96109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PPC][InlineASM] Mark the 'a' constraint as unsupported (PR #96109)

2024-06-21 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -emit-llvm -triple powerpc64le-linux-gnu -verify %s MaskRay wrote: I think one RUN line (powerpc64) is sufficient. Duplicating this for ELF/XCOFF isn't necessary. `inline-asm-constraints-error.c` might be a better test

[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

2024-06-21 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/96136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

2024-06-21 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > > This looks generally good. > > Which tests are still failing? OK. 12c0281f8c73bc1aa20d1517357e0e12c3f8bb4e has fixed these failures. If this PR is applied as well, applying https://github.com/MaskRay/llvm-project/tree/hashing-seed will not cause `check-clang` failures.

[clang] 12c0281 - [Lex] Replace hash_combine with a stable hash

2024-06-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-20T23:26:15-07:00 New Revision: 12c0281f8c73bc1aa20d1517357e0e12c3f8bb4e URL: https://github.com/llvm/llvm-project/commit/12c0281f8c73bc1aa20d1517357e0e12c3f8bb4e DIFF: https://github.com/llvm/llvm-project/commit/12c0281f8c73bc1aa20d1517357e0e12c3f8bb4e.diff

[clang] 62abd9a - [Lex] HeaderSearchOptions: Remove unused hash_value overloads

2024-06-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-20T22:46:47-07:00 New Revision: 62abd9a6f6fecaebb5aaac7720622f4ca13b3e45 URL: https://github.com/llvm/llvm-project/commit/62abd9a6f6fecaebb5aaac7720622f4ca13b3e45 DIFF: https://github.com/llvm/llvm-project/commit/62abd9a6f6fecaebb5aaac7720622f4ca13b3e45.diff

[clang] 255986e - [Driver] BuildOffloadingActions: Stabilize iteration order

2024-06-20 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-20T21:45:40-07:00 New Revision: 255986e27fcf9f0b36f7a23fbe030fcca1ba0249 URL: https://github.com/llvm/llvm-project/commit/255986e27fcf9f0b36f7a23fbe030fcca1ba0249 DIFF: https://github.com/llvm/llvm-project/commit/255986e27fcf9f0b36f7a23fbe030fcca1ba0249.diff

[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

2024-06-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: - [ ] Clang :: APINotes/module-cache.m - [ ] Clang :: Driver/cuda-bindings.cu - [ ] Clang :: Driver/cuda-phases.cu - [ ] Clang :: Driver/hip-phases.hip - [ ] Clang :: Driver/hip-toolchain-no-rdc.hip - [ ] Clang :: Driver/openmp-system-arch.c - [ ] Clang ::

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-06-20 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,174 @@ +// RUN: %clang -Wno-constant-conversion -Wno-array-bounds -Wno-division-by-zero -Wno-shift-negative-value -Wno-shift-count-negative -Wno-int-to-pointer-cast -O0

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #96240)

2024-06-20 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,174 @@ +// RUN: %clang -Wno-constant-conversion -Wno-array-bounds -Wno-division-by-zero -Wno-shift-negative-value -Wno-shift-count-negative -Wno-int-to-pointer-cast -O0

[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

2024-06-20 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This looks generally good. > > > Some check-clang-modules tests still fail (@ChuanqiXu9) > > What does this mean? Do you mean there are some failures after this patch? > What are they? Or are these tests failing before this patch? When

[clang-tools-extra] [compiler-rt] [nsan] Fix style issue (PR #96142)

2024-06-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/96142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [compiler-rt] [nsan] Fix style issue (PR #96142)

2024-06-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/96142 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

2024-06-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/96062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

2024-06-20 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/96062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [MinGW] Set a predefined __GXX_TYPEINFO_EQUALITY_INLINE=0 for… (PR #96062)

2024-06-20 Thread Fangrui Song via cfe-commits
@@ -926,6 +926,12 @@ static void InitializePredefinedMacros(const TargetInfo , if (LangOpts.GNUCVersion && LangOpts.CPlusPlus11) Builder.defineMacro("__GXX_EXPERIMENTAL_CXX0X__"); + if (TI.getTriple().isWindowsGNUEnvironment() && LangOpts.CPlusPlus) {

[clang] fd88089 - -fsanitize=vptr: Change hash function and simplify bit mixer

2024-06-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-19T22:39:54-07:00 New Revision: fd88089151e66a4cb1d90aaa224e4cb4e7a748f4 URL: https://github.com/llvm/llvm-project/commit/fd88089151e66a4cb1d90aaa224e4cb4e7a748f4 DIFF: https://github.com/llvm/llvm-project/commit/fd88089151e66a4cb1d90aaa224e4cb4e7a748f4.diff

[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

2024-06-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: This patch fixes most clangSerialization issues if we make `llvm::hash_combine`/`llvm::hash_value` non-deterministic. https://github.com/MaskRay/llvm-project/tree/hashing-seed Some check-clang-modules tests still fail (@ChuanqiXu9) along with other failures (e.g. HIP @jhuber6 )

[clang] [llvm] [Serialization] Use stable hash functions (PR #96136)

2024-06-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/96136 clangSerialization currently uses hash_combine/hash_value from Hashing.h, which are not guaranteed to be deterministic. Replace these uses with xxh3_64bits. >From 8faa9f42a01a3a832cb197465a68f02f9c0f3509 Mon

[clang] eb8d036 - [clang-linker-wrapper] Use MapVector to stabilize iteration order

2024-06-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-19T11:46:52-07:00 New Revision: eb8d036565496d4466ad9974fdf8ff91812feefb URL: https://github.com/llvm/llvm-project/commit/eb8d036565496d4466ad9974fdf8ff91812feefb DIFF: https://github.com/llvm/llvm-project/commit/eb8d036565496d4466ad9974fdf8ff91812feefb.diff

[clang] 0ea6b8e - [clang-linker-wrapper] Use MapVector to stabilize iteration order

2024-06-19 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-19T11:03:39-07:00 New Revision: 0ea6b8e476c28746f4434db6515fcffe2f9cbe4b URL: https://github.com/llvm/llvm-project/commit/0ea6b8e476c28746f4434db6515fcffe2f9cbe4b DIFF: https://github.com/llvm/llvm-project/commit/0ea6b8e476c28746f4434db6515fcffe2f9cbe4b.diff

[clang] [Clang][Sanitizers] Enable NSAN on X86_64 only (PR #95885)

2024-06-18 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/95885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sanitizers] Enable NSAN on X86_64 only (PR #95885)

2024-06-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: > ~90% of the functionality would work on aarch64, but there are a few > x86_64-specific quirks (__float128, x86-64-specific assumptions about long > double in the helper routines) that need to be refactored (beyond my current > bandwidth). I am happy to investigate them. I

[clang] [Clang][Sanitizers] Enable NSAN on X86_64 only (PR #95885)

2024-06-18 Thread Fangrui Song via cfe-commits
MaskRay wrote: If the code is generic, it might already work on aarch64... It seems sufficient to avoid compiler-rt runtime testing. https://github.com/llvm/llvm-project/pull/95885 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Make diagnostic pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make diagnostic pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/93647 >From 9770644e7db88cff2c16109ceb8cb446741d53ea Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 28 May 2024 21:33:55 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] d712ae4 - [Driver] Support -Wa, --defsym similar to -Wa, -defsym

2024-06-14 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-14T00:40:33-07:00 New Revision: d712ae4a21822a51817941e7007e0dd41343cde3 URL: https://github.com/llvm/llvm-project/commit/d712ae4a21822a51817941e7007e0dd41343cde3 DIFF: https://github.com/llvm/llvm-project/commit/d712ae4a21822a51817941e7007e0dd41343cde3.diff

[clang] c947709 - [Driver] Support -Wa, --defsym similar to -Wa, -defsym

2024-06-14 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-14T00:30:03-07:00 New Revision: c947709df7859bb7285873593adab70349a5ab3e URL: https://github.com/llvm/llvm-project/commit/c947709df7859bb7285873593adab70349a5ab3e DIFF: https://github.com/llvm/llvm-project/commit/c947709df7859bb7285873593adab70349a5ab3e.diff

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[AArch64] Decouple feature dependency expansion. (#94279)" (PR #95231)

2024-06-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: Probably unexpected. With older Clang versions, the `"target-features"` attribute contains `,+outline-atomics,+v8a,-fmv`, which is now missing. The lack of `v8a` and `outline-atomics` causes `veorq_u64` rejection. https://github.com/llvm/llvm-project/pull/95231

[clang] 2146fd0 - Revert "Reland "[AArch64] Decouple feature dependency expansion. (#94279)" (#95231)"

2024-06-13 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-13T11:49:22-07:00 New Revision: 2146fd0d8d0ede4657354594c012e7543534cd87 URL: https://github.com/llvm/llvm-project/commit/2146fd0d8d0ede4657354594c012e7543534cd87 DIFF: https://github.com/llvm/llvm-project/commit/2146fd0d8d0ede4657354594c012e7543534cd87.diff

[clang] [llvm] Reland "[AArch64] Decouple feature dependency expansion. (#94279)" (PR #95231)

2024-06-13 Thread Fangrui Song via cfe-commits
MaskRay wrote: @labrinea @tmatheson-arm Is this the expected error? zlib uses similar code. ``` % cat neon.c #include __attribute__((target("armv8-a,crc"))) uint64x2_t foo(uint64x2_t a, uint64x2_t b) { return veorq_u64(a, b); } % newclang --target=aarch64-linux-gnu -c neon.c neon.c:5:10:

[clang] ca91538 - [MC] Move AllowTemporaryLabels setting to MCContext::MCContext

2024-06-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-12T16:42:58-07:00 New Revision: ca91538c9c6f5328f398ac849dcc4230824b007e URL: https://github.com/llvm/llvm-project/commit/ca91538c9c6f5328f398ac849dcc4230824b007e DIFF: https://github.com/llvm/llvm-project/commit/ca91538c9c6f5328f398ac849dcc4230824b007e.diff

[clang] [clang] [test] Skip a test that sets PATH= on Windows (PR #95096)

2024-06-11 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/95096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [test] Skip a test that sets PATH= on Windows (PR #95096)

2024-06-11 Thread Fangrui Song via cfe-commits
@@ -77,13 +77,3 @@ // XTOR: {{llvm-spirv.*"}} // BACKEND-NOT: {{llvm-spirv.*"}} - -//- -// Check llvm-spirv- is used if it is found in PATH. -// RUN: mkdir -p %t/versioned -// RUN: touch

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I think we should update our documentation: > > https://github.com/llvm/llvm-project/blob/b01ac5137c28fa5e1b44a5d850cb7a6ace7d8799/clang/docs/UsersManual.rst?plain=1#L1186 > > Overall, this seems like a sensible improvement to me and the code changes LG. Thx. Updated

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/93647 >From 9770644e7db88cff2c16109ceb8cb446741d53ea Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 28 May 2024 21:33:55 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [llvm] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

2024-06-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/94729 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-06-07 Thread Fangrui Song via cfe-commits
@@ -86,6 +86,8 @@ DYNAMIC_TAG(RELRSZ, 35) // Size of Relr relocation table. DYNAMIC_TAG(RELR, 36)// Address of relocation table (Relr entries). DYNAMIC_TAG(RELRENT, 37) // Size of a Relr relocation entry. +DYNAMIC_TAG(CREL, 38) // CREL relocation table +

[clang] c3a5087 - [Driver, test] Add -Wno-msvc-not-found to gcc-param.c

2024-06-07 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-06-07T11:45:10-07:00 New Revision: c3a50879dfca9ab06ebfe52f48019bb6ac40bb4d URL: https://github.com/llvm/llvm-project/commit/c3a50879dfca9ab06ebfe52f48019bb6ac40bb4d DIFF: https://github.com/llvm/llvm-project/commit/c3a50879dfca9ab06ebfe52f48019bb6ac40bb4d.diff

[clang] [clang][driver] Enable '-flto' on bare-metal (PR #94738)

2024-06-07 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/94738 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

2024-06-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I think other folks than myself also got a similar problem, so it's not just > on my machine / setup. > > Should everybody set LLVM_DEFAULT_TARGET_TRIPLE with cmake instead of this > patch? Sorry, not very familiar with this... > > Would it be ok to apply this for now? The

[clang] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

2024-06-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > gcc -dumpmachine s390x-linux-gnu Then I am afraid your clang configuration is not correct. It previously detecting the GCC installation at `s390x-linux-gnu` is a mistake. You need to set LLVM_DEFAULT_TARGET_TRIPLE correctly. If for some reason you cannot change that, add

[clang] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

2024-06-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: > `clang --version Target: s390x-ibm-linux` What's `gcc -dumpmachine`? Is that `s390x-linux-gnu`. If the normalized default target triple `s390x-ibm-linux`, it's not supposed to detect a GCC installation for `s390x-linux-gnu`. You probably need to check your

[clang] Revert changes in AddDefaultGCCPrefixes() for SystemZTriples. (PR #94729)

2024-06-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: This is fine as a temporary workaround. What's `clang --version` on Ubuntu s390x? If it's390x-unknown-linux-gnu`, we have code to use `lib/s390x-linux-gnu`. CMake LLVM_DEFAULT_TARGET_TRIPLE can be used to set the default target triple.

[clang] [clang][LoongArch] Enable -fasynchronous-unwind-tables by default on Linux (PR #94711)

2024-06-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: `.eh_frame` for non-C++-exception unwinding is pretty bad... As a new architecture, you can avoid doing it... https://ubuntu.com/blog/ubuntu-performance-engineering-with-frame-pointers-by-default https://www.brendangregg.com/blog/2024-03-17/the-return-of-the-frame-pointers.html

[clang] [RISCV] Unify all the code that adds unaligned-scalar/vector-mem to Features vector. (PR #94660)

2024-06-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/94660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-06 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/93783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: Ping:) (clang/docs/ReleaseNotes.rst has a conflict, which can be fixed after a rebase) https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Driver] Rearrange some Apple version testing (PR #94514)

2024-06-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,31 @@ +// Test triple manipulations. + +// RUN: %clang -### -c %s \ +// RUN: -target i386-apple-darwin10 -mappletvsimulator-version-min=9.0 -arch x86_64 2>&1 | \ MaskRay wrote: Perhaps 2-space indentation, which is much more common. (`-target `

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-04 Thread Fangrui Song via cfe-commits
@@ -826,6 +826,10 @@ SanitizerMask Linux::getSupportedSanitizers() const { if (IsX86_64 || IsAArch64) { Res |= SanitizerKind::KernelHWAddress; } + if (IsX86_64) { +Res |= SanitizerKind::NumericalStability; MaskRay wrote: This needs a

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/93783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-04 Thread Fangrui Song via cfe-commits
@@ -826,6 +826,10 @@ SanitizerMask Linux::getSupportedSanitizers() const { if (IsX86_64 || IsAArch64) { Res |= SanitizerKind::KernelHWAddress; } + if (IsX86_64) { +Res |= SanitizerKind::NumericalStability; MaskRay wrote: drop braces for

[clang] [llvm] [Clang][Sanitizers] Add numerical sanitizer (PR #93783)

2024-06-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/93783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][test] Make the FileCheck less strict for some tests. (PR #94349)

2024-06-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/94349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-06-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: (Friendly Ping:) https://github.com/llvm/llvm-project/pull/91280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-06-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Hi @Endilll > > I did a git bisect that pointed to this change as the one blocking my > compilation on an Ubuntu docker image with clang 14.0 > > The error I see: > > ``` > CMake Error at > /test_radsan/llvm-project/compiler-rt/cmake/Modules/CheckSectionExists.cmake:72 >

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

2024-06-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > I think requiring all driver tests pass with a custom DEFAULT_SYSROOT is an > > undue burden. > > Do you know why llvm-zorg/buildbot/osuosl/master/config/builders.py > > llvm-clang-win-x-aarch64 needs to set DEFAULT_SYSROOT? > > This is the arm toolchain builders. They

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

2024-06-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > The best I can do is mark them UNSUPPORTED: system-windows to get the bots > > green again. > > This is not a good idea. You will disable these tests for the appropriate > cross builders for no reason and they will became useless for them. I would > strongly recommend to

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

2024-06-03 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Looks like the buildbots' -DDEFAULT_SYSROOT strikes again (boo...). I think > adding --sysroot="" is a common way to handle this for tests. I think `DEFAULT_SYSROOT` should be phased out. Downstream users can customize CMake `DEFAULT_SYSROOT` to set the default `--sysroot=`,

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-02 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/93647 >From 9770644e7db88cff2c16109ceb8cb446741d53ea Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 28 May 2024 21:33:55 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [llvm] [mlir] Use llvm::less_first (NFC) (PR #94136)

2024-06-01 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/94136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-31 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/89854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-31 Thread Fangrui Song via cfe-commits
@@ -4141,6 +4141,20 @@ // Begin SystemZ/GCC/Linux tests +// RUN: %clang -E -dM %s -o - 2>&1 \ +// RUN: -target s390x-ibm-zos \ MaskRay wrote: `--target=` for new driver tests. However, this does not test clangDriver and therefore

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-31 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @FHe > > > > > @MaskRay Got it. > > > > The problem with that solution is that if you use --target you won't > > > > get the correct arch. This would be a problem for any cross > > > > compilation. For example, say you cross compile from zLinux (which > > > > wouldn't have

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

2024-05-31 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. 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] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

2024-05-31 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > @gulfemsavrun Commit > > [245491a](https://github.com/llvm/llvm-project/commit/245491a9f384e4c53421196533c2a2b693efaf8d) > > (`[MC] Disable MCAssembler based constant folding for DwarfDebug`; > > independent of this patch) should have fixed the compile time regression. > >

[clang] [CUDA] Fix a couple of driver tests that really weren't being run (PR #93960)

2024-05-31 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/93960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lldb] [llvm] Reapply "[Support] Remove terminfo dependency (#92865)" (PR #93889)

2024-05-30 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/93889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [lldb] [llvm] Reapply "[Support] Remove terminfo dependency (#92865)" (PR #93889)

2024-05-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: Consider copying the original description to ensure that the linked issues will be properly closed. https://github.com/llvm/llvm-project/pull/93889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [MC] Make UseAssemblerInfoForParsing mostly true (PR #91082)

2024-05-30 Thread Fangrui Song via cfe-commits
MaskRay wrote: > We started seeing a build time regression in our Clang toolchain builders on > Mac, and I bisected to this commit: > > 1. Build step took 1.7 hours in the last build before (clang -> build) > >

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-29 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > > I don't really understand the rationale for this, and it's kind of > > > annoying. Most of the compiler's flags behave in the "last one wins" > > > fashion (such as `-O2` and `-O0`) and it's always been convenient to add > > > the flag you want at the end. Why treat

[clang] [NFC] Construct Twines before concatenation (PR #90728)

2024-05-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/90728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Construct Twines before concatenation (PR #90728)

2024-05-29 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. LGTM. This avoids a temporary std::string, which might need a memory allocation. https://github.com/llvm/llvm-project/pull/90728 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-05-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/93647 In GCC, `#pragma GCC diagnostic warning "-Wfoo"` overrides command-line `-Werror=foo` and errors that can become warnings (pedwarn with -pedantic-errors and permerror). ``` #pragma GCC diagnostic warning

[clang] 20d497c - [Driver] Remove unneeded *-linux-gnu after D158183

2024-05-28 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-28T15:33:59-07:00 New Revision: 20d497c26fc95c80a1bacb38820d92e5f52bec58 URL: https://github.com/llvm/llvm-project/commit/20d497c26fc95c80a1bacb38820d92e5f52bec58 DIFF: https://github.com/llvm/llvm-project/commit/20d497c26fc95c80a1bacb38820d92e5f52bec58.diff

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-05-28 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @MaskRay seems like this target might be too niche to go into LLVM at this > time? is it worth considering some bar before accepting such a thing into > LLVM, rather than encouraging folks to maintain such a thing in a branch for > now? Good question about the acceptance

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -259,7 +260,7 @@ class ELFObjectWriter : public MCObjectWriter { void recordRelocation(MCAssembler , const MCAsmLayout , const MCFragment *Fragment, const MCFixup , MCValue Target, uint64_t ) override; - bool usesRela(const

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -934,10 +943,51 @@ void ELFWriter::WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags, WriteWord(EntrySize); // sh_entsize } +template +static void encodeCrel(ArrayRef Relocs, raw_ostream ) { + uint OffsetMask = 8, Offset = 0, Addend = 0; + uint32_t Symidx

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -934,10 +943,51 @@ void ELFWriter::WriteSecHdrEntry(uint32_t Name, uint32_t Type, uint64_t Flags, WriteWord(EntrySize); // sh_entsize } +template +static void encodeCrel(ArrayRef Relocs, raw_ostream ) { MaskRay wrote: done

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -474,9 +480,28 @@ struct Elf_Rel_Impl, true> : public Elf_Rel_Impl, false> { LLVM_ELF_IMPORT_TYPES(Endianness, true) static const bool IsRela = true; + static const bool IsCrel = false; Elf_Sxword r_addend; // Compute value for relocatable field by adding this.

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -86,6 +86,8 @@ DYNAMIC_TAG(RELRSZ, 35) // Size of Relr relocation table. DYNAMIC_TAG(RELR, 36)// Address of relocation table (Relr entries). DYNAMIC_TAG(RELRENT, 37) // Size of a Relr relocation entry. +DYNAMIC_TAG(CREL, 38) // CREL relocation table +

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -474,9 +480,28 @@ struct Elf_Rel_Impl, true> : public Elf_Rel_Impl, false> { LLVM_ELF_IMPORT_TYPES(Endianness, true) static const bool IsRela = true; + static const bool IsCrel = false; Elf_Sxword r_addend; // Compute value for relocatable field by adding this.

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -392,6 +393,70 @@ ELFFile::decode_relrs(Elf_Relr_Range relrs) const { return Relocs; } +template +uint64_t ELFFile::crelHeader(ArrayRef Content) const { + DataExtractor Data(Content, true, 8); // endian/class is irrelevant MaskRay wrote: done

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -321,6 +321,11 @@ class ELFFile { std::vector decode_relrs(Elf_Relr_Range relrs) const; + uint64_t crelHeader(ArrayRef Content) const; MaskRay wrote: renamed to `getCrelHeader` https://github.com/llvm/llvm-project/pull/91280

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -392,6 +393,70 @@ ELFFile::decode_relrs(Elf_Relr_Range relrs) const { return Relocs; } +template +uint64_t ELFFile::crelHeader(ArrayRef Content) const { + DataExtractor Data(Content, true, 8); // endian/class is irrelevant + DataExtractor::Cursor Cur(0); + uint64_t

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Thanks for the comments. Addressed https://github.com/llvm/llvm-project/pull/91280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/91280 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91280 >From a0cfafb82db825512b0ca44778fa9d4bb435563d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 6 May 2024 15:37:50 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [llvm] [MC,llvm-readobj,yaml2obj] Support CREL relocation format (PR #91280)

2024-05-28 Thread Fangrui Song via cfe-commits
@@ -61,6 +61,9 @@ class MCTargetOptions { bool Dwarf64 : 1; + // Use CREL relocation format for ELF. + bool Crel = false; MaskRay wrote: If LLVM adopts https://llvm.org/docs/Proposals/VariableNames.html , I'd like to use `crel` instead of `cRel`. But

[clang] [z/OS] Set the default arch for z/OS to be arch10 (PR #89854)

2024-05-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: > > @MaskRay Got it. > > The problem with that solution is that if you use --target you won't get > > the correct arch. This would be a problem for any cross compilation. For > > example, say you cross compile from zLinux (which wouldn't have the config > > file), the arch

[clang] cc1: Report an error for multiple actions unless separated by -main-file-name (PR #91140)

2024-05-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I don't really understand the rationale for this, and it's kind of annoying. > Most of the compiler's flags behave in the "last one wins" fashion (such as > `-O2` and `-O0`) and it's always been convenient to add the flag you want at > the end. Why treat action flags any

[clang-tools-extra] 988cee7 - [unittest] Fix target triple

2024-05-27 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-05-27T20:29:52-07:00 New Revision: 988cee7f96d6ba56dd465b9b2f3cfade3b6e2a3f URL: https://github.com/llvm/llvm-project/commit/988cee7f96d6ba56dd465b9b2f3cfade3b6e2a3f DIFF: https://github.com/llvm/llvm-project/commit/988cee7f96d6ba56dd465b9b2f3cfade3b6e2a3f.diff

[clang] [llvm] [llvm] Add triples for managarm (PR #87845)

2024-05-27 Thread Fangrui Song via cfe-commits
MaskRay wrote: #78065 for Hurd is a good example for clang testing. https://github.com/llvm/llvm-project/pull/87845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   10   >