[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-06-05 Thread via cfe-commits
dobbelaj-snps wrote: Next builds seem to succeed. Looks like an instability of the lldb buildbot ? https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-06-05 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/23916 Here is the relevant piece of the build lo

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-06-05 Thread via cfe-commits
dobbelaj-snps wrote: > Could someone with commit access please merge this? Thanks! Done https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-06-05 Thread via cfe-commits
https://github.com/dobbelaj-snps closed https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-06-04 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: Could someone with commit access please merge this? Thanks! https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-29 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-29 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: (Not sure if this requires re-approval, but I think this is ready to be merged.) https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-27 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps updated https://github.com/llvm/llvm-project/pull/137719 >From d63c8fe4fcc8e89933bf3c1cc176941b0b9094fa Mon Sep 17 00:00:00 2001 From: Bruno De Fraine Date: Mon, 28 Apr 2025 14:12:00 +0200 Subject: [PATCH 1/6] [clang][CodeGen] Make tbaa-array test more robust Av

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-27 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: > I was still adding test cases involving may_alias, but I still found problems This has been solved in 1a40063bc73ee468cb6c8634505232b6f2d833ec. This requires to update the member types in the struct type node in case of an array member with may_alias tag. I found it is t

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-27 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps updated https://github.com/llvm/llvm-project/pull/137719 >From d63c8fe4fcc8e89933bf3c1cc176941b0b9094fa Mon Sep 17 00:00:00 2001 From: Bruno De Fraine Date: Mon, 28 Apr 2025 14:12:00 +0200 Subject: [PATCH 1/5] [clang][CodeGen] Make tbaa-array test more robust Av

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-22 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: Hm, I was still adding test cases involving may_alias, but I still found problems with the following: ``` typedef int __attribute__((may_alias)) aliasing_int; typedef int __attribute__((may_alias)) aliasing_array[10]; struct E { aliasing_int x[4]; aliasing_array y; }; ``` B

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-21 Thread Ivan Kosarev via cfe-commits
@@ -28,25 +30,39 @@ int bar(C *c) { int bar2(C *c) { // CHECK-NEW-LABEL: _Z4bar2P1C -// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_int:!.*]] +// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_C_x:!.*]] return c->x[2]; } int bar3(C *c, int j) { // CHECK-NEW-LABEL: _Z4bar3P1Ci -

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-21 Thread Ivan Kosarev via cfe-commits
https://github.com/kosarev approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-21 Thread Bruno De Fraine via cfe-commits
@@ -28,25 +30,39 @@ int bar(C *c) { int bar2(C *c) { // CHECK-NEW-LABEL: _Z4bar2P1C -// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_int:!.*]] +// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_C_x:!.*]] return c->x[2]; } int bar3(C *c, int j) { // CHECK-NEW-LABEL: _Z4bar3P1Ci -

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-21 Thread Ivan Kosarev via cfe-commits
@@ -28,25 +30,39 @@ int bar(C *c) { int bar2(C *c) { // CHECK-NEW-LABEL: _Z4bar2P1C -// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_int:!.*]] +// CHECK-NEW: load i32, {{.*}}, !tbaa [[TAG_C_x:!.*]] return c->x[2]; } int bar3(C *c, int j) { // CHECK-NEW-LABEL: _Z4bar3P1Ci -

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-20 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-20 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps updated https://github.com/llvm/llvm-project/pull/137719 >From d63c8fe4fcc8e89933bf3c1cc176941b0b9094fa Mon Sep 17 00:00:00 2001 From: Bruno De Fraine Date: Mon, 28 Apr 2025 14:12:00 +0200 Subject: [PATCH 1/4] [clang][CodeGen] Make tbaa-array test more robust Av

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-20 Thread Bruno De Fraine via cfe-commits
@@ -4503,7 +4503,29 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, E->getType(), !getLangOpts().PointerOverflowDefined, SignedIndices, E->getExprLoc(), &arrayType, E->getBase()); EltBaseInfo = ArrayLV.getBaseInfo(); -EltT

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-19 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: Thanks, those seem like good reasons. https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-19 Thread John McCall via cfe-commits
@@ -4503,7 +4503,29 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, E->getType(), !getLangOpts().PointerOverflowDefined, SignedIndices, E->getExprLoc(), &arrayType, E->getBase()); EltBaseInfo = ArrayLV.getBaseInfo(); -EltT

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-19 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-18 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: > I'm surprised we need all this. Since we don't distinguish arrays from their > elements in TBAA, is it not sufficient to just make sure that array subscript > expressions produce an l-value with the same TBAA metadata as their base > l-value? The code is written after [t

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-18 Thread Bruno De Fraine via cfe-commits
https://github.com/brunodf-snps updated https://github.com/llvm/llvm-project/pull/137719 >From d63c8fe4fcc8e89933bf3c1cc176941b0b9094fa Mon Sep 17 00:00:00 2001 From: Bruno De Fraine Date: Mon, 28 Apr 2025 14:12:00 +0200 Subject: [PATCH 1/3] [clang][CodeGen] Make tbaa-array test more robust Av

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-15 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: I'm surprised we need all this. Since we don't distinguish arrays from their elements in TBAA, is it not sufficient to just make sure that array subscript expressions produce an l-value with the same TBAA metadata as their base l-value? https://github.co

[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

2025-05-15 Thread Bruno De Fraine via cfe-commits
brunodf-snps wrote: > @kosarev @fhahn @rjmccall @efriedma-quic @hfinkel Ping. @AaronBallman @nikic any idea who else could review TBAA changes? https://github.com/llvm/llvm-project/pull/137719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h