[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2024-01-11 Thread Bushev Dmitry via cfe-commits
@@ -184,13 +205,59 @@ 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() || Ty->

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2024-01-11 Thread Vlad Serebrennikov via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-linux -std=c++11 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s -// RUN

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2024-01-11 Thread Bushev Dmitry via cfe-commits
dybv-sc wrote: > Thanks for working on this! I think it would be good to split this up into > multiple distinct parts for the different improvements. > > I put up a patch to support distinct metadata for distinct pointers a while > ago, which I just moved to GH: #76261. > > The discussion on

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-backend-risc-v Author: Bushev Dmitry (dybv-sc) Changes Options to disable new behaviour: -Xclang -no-union-tbaa -Xclang -no-pointer-tbaa -Xclang -no-array-tbaa To enable union struct path

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-12 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 97181bf9a05251d48c8016ad61d3e38df90620bb 8711499955afb9fd273da929f14742aed2dac822 --

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-14 Thread Vlad Serebrennikov via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s Endilll wrote: Can you explain why `-disable-llvm-passes` is there, and why is can be removed now? https://github.co

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-19 Thread Bushev Dmitry via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s dybv-sc wrote: Yes, The matter is that if no llvm passes are run, IR is unoptimized and contains extra load and stor

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-19 Thread Bushev Dmitry via cfe-commits
https://github.com/dybv-sc edited https://github.com/llvm/llvm-project/pull/75177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-19 Thread John McCall via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s rjmccall wrote: This is okay as long as you're sure the optimization will be performed and you make sure your test on

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread Bushev Dmitry via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-linux -std=c++98 %s -O3 -disable-llvm-passes -pedantic-errors -emit-llvm -o - | FileCheck %s dybv-sc wrote: I am sure that level 3 optimization should cut out all stack manipulation here leaving only one necess

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: In general, this patch needs to be clearer about what rules it's actually enforcing. You're adding new command-line options, but users have to guess what they mean! If you're going to be working on TBAA, would you mind adding a section to Clang's manual

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-20 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/75177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-21 Thread Bushev Dmitry via cfe-commits
@@ -184,13 +199,24 @@ 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() || Ty->

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-22 Thread Bushev Dmitry via cfe-commits
@@ -184,13 +199,24 @@ 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() || Ty->

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-22 Thread Bushev Dmitry via cfe-commits
@@ -216,6 +216,9 @@ 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. CODEGENOPT(S

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-22 Thread Nikita Popov via cfe-commits
nikic wrote: (As usual, please make any LLVM changes separately from Clang changes, especially if they affect IR design.) https://github.com/llvm/llvm-project/pull/75177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-25 Thread Bushev Dmitry via cfe-commits
dybv-sc wrote: I made separate PR for llvm's part: https://github.com/llvm/llvm-project/pull/76356 It should me merged first, because clang's part depends on it. https://github.com/llvm/llvm-project/pull/75177 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-28 Thread John McCall via cfe-commits
@@ -184,13 +205,59 @@ 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() || Ty->

[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

2023-12-30 Thread Florian Hahn via cfe-commits
fhahn wrote: Thanks for working on this! I think it would be good to split this up into multiple distinct parts for the different improvements. I put up a patch to support distinct metadata for distinct pointers a while ago, which I just moved to GH: #76261. The discussion on Phabricator has