[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)

2024-07-21 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/99808 Update createEdgeMask to created masks where the terminator in Src is a switch. We need to handle 2 separate cases: 1. Dst is not the default desintation. Dst is reached if any of the cases with destination ==

[clang] f9f6f5a - [TBAA] Remove remaining entry BB in check lines for tbaa-pointers.c (2)

2024-07-19 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-07-19T15:48:50+01:00 New Revision: f9f6f5a9c7748fe485adee206748adf28a849b79 URL: https://github.com/llvm/llvm-project/commit/f9f6f5a9c7748fe485adee206748adf28a849b79 DIFF: https://github.com/llvm/llvm-project/commit/f9f6f5a9c7748fe485adee206748adf28a849b79.diff

[clang] 47c08fb - [TBAA] Remove references to entry BB in check lines for tbaa-pointers.c

2024-07-19 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-07-19T14:51:27+01:00 New Revision: 47c08fb8d79ec1bf85cc542be6ca2591ebf2d361 URL: https://github.com/llvm/llvm-project/commit/47c08fb8d79ec1bf85cc542be6ca2591ebf2d361 DIFF: https://github.com/llvm/llvm-project/commit/47c08fb8d79ec1bf85cc542be6ca2591ebf2d361.diff

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-12 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/76612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-12 Thread Florian Hahn via cfe-commits
@@ -233,6 +233,7 @@ ENUM_CODEGENOPT(StructReturnConvention, StructReturnConventionKind, 2, SRCK_Defa CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions. CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled.

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-10 Thread Florian Hahn via cfe-commits
@@ -392,6 +392,10 @@ Non-comprehensive list of changes in this release - ``#pragma GCC diagnostic warning "-Wfoo"`` can now downgrade ``-Werror=foo`` errors and certain default-to-error ``-W`` diagnostics to warnings. +- Clang now emits distinct type-based alias analysis

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-10 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: > First of all I want to say that this is a really cool project, especially the > type sanitizer part. Thanks for working on this! > > > Just updated the tysan branches again. Unfortunately we aren't yet at a > > point where LLVM is `tysan` clean, there is

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-07-10 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/76612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][ARM][AArch64] Alway emit protection attributes for functions. (PR #82819)

2024-07-10 Thread Florian Hahn via cfe-commits
fhahn wrote: It looks like there's still a failure related to this patch on current main AFAICT (MSAN finds a use of uninitialized value): https://lab.llvm.org/buildbot/#/builders/169/builds/852/steps/12/logs/stdio ``` FAIL: Clang :: CodeGen/arm-branch-protection-attr-1.c (3 of 83868)

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-07-09 Thread Florian Hahn via cfe-commits
fhahn wrote: Would it be possible to add a test case? Could you add a bit more detail how different mange contexts cause crashes in TBAA? https://github.com/llvm/llvm-project/pull/98138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [SCCP] Add support for vectors (PR #98026)

2024-07-09 Thread Florian Hahn via cfe-commits
https://github.com/fhahn approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/98026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: > Changes generally LGTM though I think this should come with a release note so > users know about the new command line options and functionality? Thanks, I tried to add release note entries for the new behavior + the new flags. Hope I added them in the

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/76612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-27 Thread Florian Hahn via cfe-commits
@@ -185,10 +185,56 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() ||

[clang] [llvm] [Pipelines] Move IPSCCP after inliner pipeline (PR #96620)

2024-06-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn commented: Running IPSCCP twice seems like quite a heavy hammer, I'd expect a noticeable compile-time impact. I'd recommend to try to extract a reproducer from your motivating use case and check why IPSCCP cannot perform the desired optimization before inlining. Note

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-26 Thread Florian Hahn via cfe-commits
@@ -185,10 +185,33 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() ||

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-26 Thread Florian Hahn via cfe-commits
@@ -185,10 +185,33 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. fhahn wrote: Added, thank you very much! https://github.com/llvm/llvm-project/pull/76612

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-25 Thread Florian Hahn via cfe-commits
fhahn wrote: Rebased, updated and added option to disable this (`-fno-pointer-tbaa`). I think this would be ready for a review now :) https://github.com/llvm/llvm-project/pull/76612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2024-06-19 Thread Florian Hahn via cfe-commits
fhahn wrote: Thanks, I'll hope to get back to this and make the suggested adjustments soonish https://github.com/llvm/llvm-project/pull/95004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-11 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/76612 >From 61c94b87858e51748a9664acab51ca4c964265a4 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sat, 30 Dec 2023 10:39:58 + Subject: [PATCH] [TBAA] Emit distinct TBAA tags for pointers with different

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2024-06-10 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/95004 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add value_type attr, use it to add noalias when pass-by-value. (PR #95004)

2024-06-10 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/95004 This adds an attribute version of -fpass-by-value-is-noalias (added in a874d63344) Still needs proper docs. >From 34e880a20b0b36218a1307e52ccb71092bfd64f7 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon,

[clang-tools-extra] clang-doc switched from using relative to absolute paths (PR #93281)

2024-05-24 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/93281 >From f5872e7c82d097ae3c141765d3f1d7e3d0b25b82 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Fri, 24 May 2024 04:28:08 -0400 Subject: [PATCH 1/2] clang-doc switched from using relative to absolute paths ---

[clang] Run ObjCContractPass in Distributed Thin-LTO Pipeline (PR #92331)

2024-05-16 Thread Florian Hahn via cfe-commits
fhahn wrote: Shouldn't this be added to the LTO code generator? In `libLTO` (used by Apple's linker) it is added here `llvm/lib/LTO/ThinLTOCodeGenerator.cpp` https://github.com/llvm/llvm-project/pull/92331 ___ cfe-commits mailing list

[clang] 8a4cbea - [Clang] Unbreak build take 2 using uint64_t() explicitly.

2024-05-15 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-05-15T15:49:03+01:00 New Revision: 8a4cbeada930bf11fe740a2038bd5a3230712284 URL: https://github.com/llvm/llvm-project/commit/8a4cbeada930bf11fe740a2038bd5a3230712284 DIFF: https://github.com/llvm/llvm-project/commit/8a4cbeada930bf11fe740a2038bd5a3230712284.diff

[clang] [clang][SPARC] Treat empty structs as if it's a one-bit type in the CC (PR #90338)

2024-05-15 Thread Florian Hahn via cfe-commits
fhahn wrote: This breaks building on some platforms. Should be fixed with da116bd82c0a78d2022c34b56e45cf6e4f91eaed https://github.com/llvm/llvm-project/pull/90338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] da116bd - [Clang] Use ULL for std::max constant argument to fix build failure.

2024-05-15 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-05-15T15:37:52+01:00 New Revision: da116bd82c0a78d2022c34b56e45cf6e4f91eaed URL: https://github.com/llvm/llvm-project/commit/da116bd82c0a78d2022c34b56e45cf6e4f91eaed DIFF: https://github.com/llvm/llvm-project/commit/da116bd82c0a78d2022c34b56e45cf6e4f91eaed.diff

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
@@ -0,0 +1,116 @@ +; RUN: opt < %s -passes='print' -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s fhahn wrote: Please also check the `access-info` report. https://github.com/llvm/llvm-project/pull/78432

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
@@ -0,0 +1,116 @@ +; RUN: opt < %s -passes='print' -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s + +; REQUIRES: asserts + + +define void @frexp_f64(ptr %in, ptr %out1, ptr %out2, i32 %N) { +; CHECK: LAA: Allow to vectorize math function with write-only attribute:

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
@@ -0,0 +1,116 @@ +; RUN: opt < %s -passes='print' -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s + +; REQUIRES: asserts + + +define void @frexp_f64(ptr %in, ptr %out1, ptr %out2, i32 %N) { +; CHECK: LAA: Allow to vectorize math function with write-only attribute:

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized +

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
@@ -0,0 +1,116 @@ +; RUN: opt < %s -passes='print' -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s + +; REQUIRES: asserts + + +define void @frexp_f64(ptr %in, ptr %out1, ptr %out2, i32 %N) { +; CHECK: LAA: Allow to vectorize math function with write-only attribute:

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. fhahn wrote: comment out of date https://github.com/llvm/llvm-project/pull/78432

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Florian Hahn via cfe-commits
https://github.com/fhahn requested changes to this pull request. https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang backend] In AArch64's DataLayout, specify a minimum function alignment of 4. (PR #90702)

2024-05-02 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/90702 >From 4c312af7af5d0e419269c5b2304b0f898363bb85 Mon Sep 17 00:00:00 2001 From: Doug Wyatt Date: Tue, 30 Apr 2024 21:43:16 -0700 Subject: [PATCH 1/5] In AArch64's DataLayout, specify a minimum function alignment of

[clang] [llvm] [clang backend] In AArch64's DataLayout, specify a minimum function alignment of 4. (PR #90702)

2024-05-02 Thread Florian Hahn via cfe-commits
https://github.com/fhahn approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/90702 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang backend] In AArch64's DataLayout, specify a minimum function alignment of 4. (PR #90702)

2024-05-02 Thread Florian Hahn via cfe-commits
@@ -1480,11 +1480,11 @@ AArch64leTargetInfo::AArch64leTargetInfo(const llvm::Triple , void AArch64leTargetInfo::setDataLayout() { if (getTriple().isOSBinFormatMachO()) { if(getTriple().isArch32Bit()) - resetDataLayout("e-m:o-p:32:32-i64:64-i128:128-n32:64-S128",

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-30 Thread Florian Hahn via cfe-commits
@@ -0,0 +1,117 @@ +; RUN: opt < %s -mattr=+sve -vector-library=ArmPL -passes=inject-tli-mappings,loop-vectorize -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s + +; REQUIRES: asserts + +target triple = "aarch64-unknown-linux-gnu" + +; TODO: add mappings for

[clang] [clang][NFC] Reformat suspicious condition (PR #89923)

2024-04-30 Thread Florian Hahn via cfe-commits
@@ -1444,7 +1444,7 @@ struct PragmaWarningHandler : public PragmaHandler { .Case("once", PPCallbacks::PWS_Once) .Case("suppress", PPCallbacks::PWS_Suppress) .Default(-1); -

[clang] [clang] Introduce `SemaCUDA` (PR #88559)

2024-04-13 Thread Florian Hahn via cfe-commits
fhahn wrote: Is it possible that this broke this bot failing with the error below? ``` usr/local/clang-17.0.2/bin/clang++ -DGTEST_HAS_RTTI=0 -D_CINDEX_LIB_ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LARGE_FILE_API -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

[clang] 1803d67 - [Driver] Add missing include of std::set.

2024-04-06 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-04-06T14:56:35+01:00 New Revision: 1803d675004bb512051d2df7e1ae3ea95692fc67 URL: https://github.com/llvm/llvm-project/commit/1803d675004bb512051d2df7e1ae3ea95692fc67 DIFF: https://github.com/llvm/llvm-project/commit/1803d675004bb512051d2df7e1ae3ea95692fc67.diff

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/87753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix tbaa.struct metadata for bitfields using big endian. (PR #87753)

2024-04-05 Thread Florian Hahn via cfe-commits
https://github.com/fhahn approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/87753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Change the default linker for `wasm32-wasip2` (PR #84569)

2024-03-18 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/84569 >From 99ca952b60344d2ff683d05d8baa423aa11da83a Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 8 Mar 2024 13:36:18 -0800 Subject: [PATCH 1/2] [WebAssembly] Change the default linker for `wasm32-wasip2`

[clang] [TBAA] Generate tbaa.struct single field with char tag for unions. (PR #84370)

2024-03-11 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/84370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Generate tbaa.struct single field with char tag for unions. (PR #84370)

2024-03-11 Thread Florian Hahn via cfe-commits
fhahn wrote: > Do you have a testcase that shows how this goes wrong without this change ? I am not 100% if the type-based aliasing rules allow aliasing a union access containing a float and a plain pointer to float, but I am thinking about something like the below, where we remove the first

[clang] [TBAA] Generate tbaa.struct single field with char tag for unions. (PR #84370)

2024-03-11 Thread Florian Hahn via cfe-commits
fhahn wrote: ping :) (apologies for early ping, but I'd like to bump this as this is a potential mis-compile I think( https://github.com/llvm/llvm-project/pull/84370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [TBAA] Add bail-out to skip tbaa generation to getTBAAStructInfo. (PR #84386)

2024-03-08 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/84386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Add bail-out to skip tbaa generation to getTBAAStructInfo. (PR #84386)

2024-03-07 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/84386 Without this bail out, we may generate fields with null nodes as tags are generated by using getTypeInfo which has the same bail out. >From 36144a7b2a84b10711904c1a568bf02554f83296 Mon Sep 17 00:00:00 2001 From:

[clang] 167b90d - [TBAA] Add test showing tbaa.struct being generated with relaxed-alias.

2024-03-07 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-03-07T21:40:23Z New Revision: 167b90d0401d0fe488195c7e3d6fc1edc8fc5d94 URL: https://github.com/llvm/llvm-project/commit/167b90d0401d0fe488195c7e3d6fc1edc8fc5d94 DIFF: https://github.com/llvm/llvm-project/commit/167b90d0401d0fe488195c7e3d6fc1edc8fc5d94.diff LOG:

[clang] [TBAA] Generate tbaa.struct single field with char tag for unions. (PR #84370)

2024-03-07 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/84370 At the moment,distinct fields for each union member are generated. When copying a union, we don't know which union member is active, so there's no benefit from recording the different fields. It can result in

[clang] 6f29941 - [TBAA] Add extra tests to copy structs with union members.

2024-03-07 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-03-07T18:57:09Z New Revision: 6f299417769ade1635c91f974a8745e237cc9adf URL: https://github.com/llvm/llvm-project/commit/6f299417769ade1635c91f974a8745e237cc9adf DIFF: https://github.com/llvm/llvm-project/commit/6f299417769ade1635c91f974a8745e237cc9adf.diff LOG:

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-27 Thread Florian Hahn via cfe-commits
fhahn wrote: Thanks! https://github.com/llvm/llvm-project/pull/82922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/82922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-27 Thread Florian Hahn via cfe-commits
fhahn wrote: > Whitespace is weird in a few places; otherwise looks fine. Argh yes, should be fixed in the latest version. Still need to figure out how to make sure all changes are formatted once the branch contains merges (before the format checker complains and shows the commits)

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-27 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922 >From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 25 Feb 2024 13:23:17 + Subject: [PATCH 1/7] [TBAA] Skip all bitfields when generating !tbaa.struct

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
@@ -294,18 +297,49 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, return false; const ASTRecordLayout = Context.getASTRecordLayout(RD); +const CGRecordLayout = CGTypes.getCGRecordLayout(RD); unsigned idx = 0; -for (RecordDecl::field_iterator i

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
@@ -294,18 +297,49 @@ CodeGenTBAA::CollectFields(uint64_t BaseOffset, return false; const ASTRecordLayout = Context.getASTRecordLayout(RD); +const CGRecordLayout = CGTypes.getCGRecordLayout(RD); unsigned idx = 0; -for (RecordDecl::field_iterator i

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922 >From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 25 Feb 2024 13:23:17 + Subject: [PATCH 1/6] [TBAA] Skip all bitfields when generating !tbaa.struct

[clang] 54cff50 - [TBAA] Add !tbaa.struct test with unnamed bitfields.

2024-02-26 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-02-26T22:50:50Z New Revision: 54cff50791dec977feb0badb74919d97dff5b859 URL: https://github.com/llvm/llvm-project/commit/54cff50791dec977feb0badb74919d97dff5b859 DIFF: https://github.com/llvm/llvm-project/commit/54cff50791dec977feb0badb74919d97dff5b859.diff LOG:

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
fhahn wrote: > This seems like it messes up the metadata in a different way: we have no > representation of the bitfield at all, so it looks like it's padding. > > I think we want to treat multiple adjacent bitfields as a single "field". So > NamedBitfields from the testcase would have three

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/82922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Handle bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/82922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Skip all bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922 >From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 25 Feb 2024 13:23:17 + Subject: [PATCH 1/5] [TBAA] Skip all bitfields when generating !tbaa.struct

[clang] f290c00 - [TBAA] Add additional bitfield tests.

2024-02-26 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-02-26T12:36:00Z New Revision: f290c000d87bfc72a31b151dffa2d190596ebe91 URL: https://github.com/llvm/llvm-project/commit/f290c000d87bfc72a31b151dffa2d190596ebe91 DIFF: https://github.com/llvm/llvm-project/commit/f290c000d87bfc72a31b151dffa2d190596ebe91.diff LOG:

[clang] [TBAA] Skip all bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-26 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/82922 >From 556fcefed9645aa0a0a965ff8f22d8accdf9eefc Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 25 Feb 2024 13:23:17 + Subject: [PATCH 1/2] [TBAA] Skip all bitfields when generating !tbaa.struct

[clang] [TBAA] Skip all bitfields when generating !tbaa.struct metadata. (PR #82922)

2024-02-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn created https://github.com/llvm/llvm-project/pull/82922 At the moment, clang generates what I believe are incorrect !tbaa.struct fields for named bitfields. At the moment, the base type size is used for named bifields (e.g. sizeof(int)) instead of the bifield width per

[clang] 7110147 - [TBAA] Test for tbaa.struct creation for struct with named bitfields.

2024-02-25 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2024-02-25T13:17:08Z New Revision: 711014714716753f791291ed6a152e00899469a3 URL: https://github.com/llvm/llvm-project/commit/711014714716753f791291ed6a152e00899469a3 DIFF: https://github.com/llvm/llvm-project/commit/711014714716753f791291ed6a152e00899469a3.diff LOG:

[clang] [llvm] [SROA] Use !tbaa instead of !tbaa.struct if op matches field. (PR #81289)

2024-02-16 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/81289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SROA] Use !tbaa instead of !tbaa.struct if op matches field. (PR #81289)

2024-02-16 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/81289 >From e6de9f21b162c57dd09cb4de3147b7ab09ef8681 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 9 Feb 2024 13:29:19 + Subject: [PATCH 1/5] [TBAA] Extract logic to use TBAA tag for field of !tbaa.struct

[clang] [compiler-rt] [llvm] [clang-tools-extra] [libc] [flang] [VPlan] Consistently use (Part, 0) for first lane scalar values (PR #80271)

2024-02-06 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80271 >From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 31 Jan 2024 14:02:38 + Subject: [PATCH 1/3] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. A

[llvm] [clang-tools-extra] [flang] [clang] [Matrix] Convert column-vector ops feeding dot product to row-vectors. (PR #72647)

2024-02-06 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/72647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [flang] [Matrix] Convert column-vector ops feeding dot product to row-vectors. (PR #72647)

2024-02-06 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/72647 >From 3dfe86782806f048b130d46afa6293712919f672 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 14 Apr 2023 14:33:57 +0100 Subject: [PATCH 1/2] [Matrix] Convert column-vector ops feeding dot product to

[llvm] [clang] [clang-tools-extra] [Matrix] Convert column-vector ops feeding dot product to row-vectors. (PR #72647)

2024-02-06 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/72647 >From 3dfe86782806f048b130d46afa6293712919f672 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 14 Apr 2023 14:33:57 +0100 Subject: [PATCH 1/2] [Matrix] Convert column-vector ops feeding dot product to

[llvm] [mlir] [clang] [libcxx] [clang-tools-extra] [flang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -453,16 +453,17 @@ Value *VPInstruction::generateInstruction(VPTransformState , else if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) { TrackingVH ReductionStartValue = RdxDesc.getRecurrenceStartValue(); - ReducedPartRdx =

[llvm] [mlir] [clang-tools-extra] [clang] [libcxx] [flang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -9110,6 +9111,41 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( continue; const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor(); +// Adjust AnyOf reductions; replace the reduction phi for the selected value fhahn

[clang] [libcxx] [flang] [mlir] [clang-tools-extra] [llvm] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -9142,7 +9178,9 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( // then extend the loop exit value to enable InstCombine to evaluate the // entire expression in the smaller type. Type *PhiTy = PhiR->getStartValue()->getLiveInIRValue()->getType(); -

[clang-tools-extra] [libcxx] [mlir] [llvm] [clang] [flang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -9110,6 +9111,41 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( continue; const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor(); +// Adjust AnyOf reductions; replace the reduction phi for the selected value +// with a boolean

[clang-tools-extra] [libcxx] [mlir] [clang] [llvm] [flang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -1079,16 +1070,13 @@ Value *llvm::createAnyOfTargetReduction(IRBuilderBase , Value *Src, NewVal = SI->getTrueValue(); } - // Create a splat vector with the new value and compare this to the vector - // we want to reduce. - ElementCount EC =

[clang] [clang-tools-extra] [llvm] [mlir] [libcxx] [flang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -9110,6 +9111,41 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( continue; const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor(); +// Adjust AnyOf reductions; replace the reduction phi for the selected value +// with a boolean

[clang] [clang-tools-extra] [mlir] [flang] [libcxx] [llvm] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -452,16 +452,17 @@ Value *VPInstruction::generateInstruction(VPTransformState , else if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) { TrackingVH ReductionStartValue = RdxDesc.getRecurrenceStartValue(); fhahn wrote:

[libcxx] [flang] [mlir] [clang] [llvm] [clang-tools-extra] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -453,16 +453,17 @@ Value *VPInstruction::generateInstruction(VPTransformState , else if (RecurrenceDescriptor::isAnyOfRecurrenceKind(RK)) { TrackingVH ReductionStartValue = RdxDesc.getRecurrenceStartValue(); - ReducedPartRdx =

[libcxx] [llvm] [flang] [mlir] [clang-tools-extra] [clang] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -9110,6 +9111,41 @@ void LoopVectorizationPlanner::adjustRecipesForReductions( continue; const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor(); +// Adjust AnyOf reductions; replace the reduction phi for the selected value +// with a boolean

[clang-tools-extra] [flang] [clang] [libcxx] [llvm] [mlir] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-05 Thread Florian Hahn via cfe-commits
@@ -7486,7 +7486,8 @@ static void createAndCollectMergePhiForReduction( auto *PhiR = cast(RedResult->getOperand(0)); const RecurrenceDescriptor = PhiR->getRecurrenceDescriptor(); - TrackingVH ReductionStartValue = RdxDesc.getRecurrenceStartValue(); + TrackingVH

[mlir] [clang] [flang] [libcxx] [llvm] [clang-tools-extra] [LV] Improve AnyOf reduction codegen. (PR #78304)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/78304 >From 9846f970b6b394ccc3af25b92f238377a8ae7807 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Sun, 14 Jan 2024 18:06:36 + Subject: [PATCH 1/2] [LV] Improve AnyOf reduction codegen. Update AnyOf reduction

[llvm] [clang] [clang-tools-extra] [VPlan] Consistently use (Part, 0) for first lane scalar values (PR #80271)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80271 >From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 31 Jan 2024 14:02:38 + Subject: [PATCH 1/3] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. A

[llvm] [clang] [clang-tools-extra] [VPlan] Consistently use (Part, 0) for first lane scalar values (PR #80271)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80271 >From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 31 Jan 2024 14:02:38 + Subject: [PATCH 1/2] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. A

[clang] [llvm] [clang-tools-extra] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/80269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
fhahn wrote: > The only observable changes to existing tests involve cse'ing IV steps from > replicate regions when unrolling w/o vectorizing, iinm. Is there some other > scenario worth testing? I wasn't able to come up with a different test with vectorizing.

[clang] [llvm] [clang-tools-extra] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn edited https://github.com/llvm/llvm-project/pull/80269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
@@ -1397,9 +1397,9 @@ void VPSlotTracker::assignSlots(const VPBasicBlock *VPBB) { assignSlot(Def); } -bool vputils::onlyFirstLaneUsed(VPValue *Def) { +bool vputils::onlyFirstLaneUsed(const VPValue *Def) { return all_of(Def->users(), -[Def](VPUser *U)

[llvm] [clang-tools-extra] [clang] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
@@ -1397,9 +1397,9 @@ void VPSlotTracker::assignSlots(const VPBasicBlock *VPBB) { assignSlot(Def); } -bool vputils::onlyFirstLaneUsed(VPValue *Def) { +bool vputils::onlyFirstLaneUsed(const VPValue *Def) { return all_of(Def->users(), -[Def](VPUser *U)

[clang] [clang-tools-extra] [llvm] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
@@ -1256,23 +1256,7 @@ class VPInstruction : public VPRecipeWithIRFlags { } } fhahn wrote: Added back, thanks! https://github.com/llvm/llvm-project/pull/80269 ___ cfe-commits mailing list

[clang] [llvm] [clang-tools-extra] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
@@ -515,6 +515,24 @@ void VPInstruction::execute(VPTransformState ) { State.set(this, GeneratedValue, Part); } } +bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const { + assert(is_contained(operands(), Op) && "Op must be an operand of the recipe"); + if

[clang] [clang-tools-extra] [llvm] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80269 >From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 31 Jan 2024 14:02:38 + Subject: [PATCH 1/2] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. A

[clang] [clang-tools-extra] [llvm] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80269 >From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 31 Jan 2024 14:02:38 + Subject: [PATCH] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. A

[llvm] [clang-tools-extra] [clang] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. (PR #80269)

2024-02-03 Thread Florian Hahn via cfe-commits
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/80269 >From f4dabdfaa66744ecfca4c0a57472a357db9715d9 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 31 Jan 2024 14:02:38 + Subject: [PATCH] [VPlan] Update VPInst::onlyFirstLaneUsed to check users. A

[clang] [libc] [llvm] [clang-tools-extra] [flang] [SLP] Initial vectorization of non-power-of-2 ops. (PR #77790)

2024-02-02 Thread Florian Hahn via cfe-commits
@@ -6987,6 +7024,17 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis { auto *VecTy = FixedVectorType::get(VL.front()->getType(), VL.size()); InstructionCost GatherCost = 0; SmallVector Gathers(VL.begin(), VL.end()); +auto ComputeGatherCost =

  1   2   3   4   5   >