[clang] [ASAN] Adjust asan instrumented GlobalVariable size to not include redzone (PR #66666)

2023-10-13 Thread via cfe-commits
b-sumner wrote: @hctim as far as I'm concerned, the symbol is already not the right size. The right size of a global variable of type float is 4, not 32. And disabling ASAN checking in the copy mechanism would reduce the usefulness of the address sanitizer. But I take your point about link

[clang] [clang][AArch64] Pass down stack clash protection options to LLVM/Backend (PR #68993)

2023-10-13 Thread Momchil Velikov via cfe-commits
@@ -1076,6 +1076,16 @@ void CodeGenModule::Release() { "sign-return-address-with-bkey", 1); } + if (Arch == llvm::Triple::aarch64 || Arch == llvm::Triple::aarch64_be) { momchil-velikov wrote: Stack probing needs to be enable

[clang] [clang][AArch64] Pass down stack clash protection options to LLVM/Backend (PR #68993)

2023-10-13 Thread Momchil Velikov via cfe-commits
@@ -2287,7 +2297,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, if ((!D || !D->hasAttr()) && CodeGenOpts.UnwindTables) B.addUWTableAttr(llvm::UWTableKind(CodeGenOpts.UnwindTables)); - if (CodeGenOpts.StackClashProtector) + if (CodeGenOp

[libunwind] [libc++] Implement ranges::contains (PR #65148)

2023-10-13 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/13] [libc++] Implement ranges::contains Differential Revision

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-10-13 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/13] [libc++] Implement ranges::contains Differential Revision

[libunwind] [libc++] Implement ranges::contains (PR #65148)

2023-10-13 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/15] [libc++] Implement ranges::contains Differential Revision

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-10-13 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/15] [libc++] Implement ranges::contains Differential Revision

[clang] Change all CHECK lines in test to include DAG to work when the compiler emits debug info in a different order. (PR #67503)

2023-10-13 Thread Paul T Robinson via cfe-commits
pogo59 wrote: In general, you cannot combine suffixes in the same directive. FileCheck will detect and complain about some combinations, but it doesn't detect all of them. I believe `CHECK-DAG-SAME` does not work the way you want it to, and in fact acts as a no-op. This would be easy to verify

[PATCH] D156453: [clang][Interp] Create only globals when initializing a global variable

2023-10-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156453#4652939 , @tbaeder wrote: > It gets interpreted as a constant expression in > `Sema::CheckCompleteVariableInitialization()`: > > * #0: Context.cpp:73 > clang::interp::Context::evaluateAsInitializer(this=0x000

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-13 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 5ea8bea2bdf345e2baee07e0a94ac40bd0f109c4 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 1/3] This change adds support for the PPA2 section in zOS --- clang

[clang] Add Documentation for Execution Results Handling in Clang-Repl (PR #65650)

2023-10-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @Krishna-13-cyber, could you implement the suggestion and we can try to recommit the code. https://github.com/llvm/llvm-project/pull/65650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-13 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 5ea8bea2bdf345e2baee07e0a94ac40bd0f109c4 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 1/4] This change adds support for the PPA2 section in zOS --- clang

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-13 Thread Ulrich Weigand via cfe-commits
@@ -10,7 +10,7 @@ // .byte (i.e., the one for the 3) would, it seems, also match // the .byte line below for the 34. -// RUN: %clang_cc1 --target=s390x-ibm-zos -xc -S -o - %s | FileCheck %s --check-prefix CHECK-C +// RUN: %clang --target=s390x-ibm-zos -xc -S -o - %s |

[clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-10-13 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-13 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/68999 We associated conversion seq for args (when reversed) to the wrong index. This lead to clang believing reversed `operator==` a worse overload candidate than the `operator==` without reversed args when both these can

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes We associated conversion seq for args (when reversed) to the wrong index. This lead to clang believing reversed `operator==` a worse overload candidate than the `operator==` without reversed args when both th

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-13 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68999 >From 01ba05ec9349c7b93239b7e6196e3fa6c7fc1f82 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 13 Oct 2023 17:17:32 +0200 Subject: [PATCH 1/2] Correctly compute conversion seq for args to fn with reveresed

[clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-10-13 Thread Hubert Tong via cfe-commits
@@ -660,14 +671,16 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI, "GETtls[ld]ADDR[32] must read GPR3"); if (Subtarget->isAIXABI()) { -// On AIX, the variable offset should already be in R4 and the region handle -// should already be in R3. -

[clang] [PowerPC] Support local-dynamic TLS relocation on AIX (PR #66316)

2023-10-13 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast edited https://github.com/llvm/llvm-project/pull/66316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-13 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/68999 >From 01ba05ec9349c7b93239b7e6196e3fa6c7fc1f82 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Fri, 13 Oct 2023 17:17:32 +0200 Subject: [PATCH 1/3] Correctly compute conversion seq for args to fn with reveresed

[clang] Remove experimental from Vector Crypto extensions (PR #69000)

2023-10-13 Thread Alex Bradbury via cfe-commits
asb wrote: Thanks for the patch, some very quick feedback and I'd highlight the first bullet as the most important, as this is potentially a blocker for graduating these extensions from experimental. * My big concern with this would be the intrinsics - could you please comment on the status o

[clang] Remove experimental from Vector Crypto extensions (PR #69000)

2023-10-13 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 ba79fb2e1ff7130cde02fbbd325f0f96f8a522ca 521060552794304a5f6b31e38c25ab0a7a0353ff --

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-13 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 ba79fb2e1ff7130cde02fbbd325f0f96f8a522ca 74712023035fe4d670306776d9808bed91fe4ba3 --

[clang] [DebugMetadata][DwarfDebug] Clone uniqued function-local types after metadata loading (PR #68986)

2023-10-13 Thread Vladislav Dzhidzhoev via cfe-commits
https://github.com/dzhidzhoev edited https://github.com/llvm/llvm-project/pull/68986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-13 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 5ea8bea2bdf345e2baee07e0a94ac40bd0f109c4 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 1/5] This change adds support for the PPA2 section in zOS --- clang

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-13 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 5ea8bea2bdf345e2baee07e0a94ac40bd0f109c4 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 1/6] This change adds support for the PPA2 section in zOS --- clang

[clang] [clang] Better bitfield access units (PR #65742)

2023-10-13 Thread Nathan Sidwell via cfe-commits
urnathan wrote: time for another ping, I think ... https://github.com/llvm/llvm-project/pull/65742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
https://github.com/lawben created https://github.com/llvm/llvm-project/pull/69010 Adds a new `__builtin_vectorelements()` function which returns the number of elements for a given vector either at compile-time for fixed-sized vectors, e.g., via `__attribute__((vector_size(N))` or runtime via a

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
https://github.com/lawben edited https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
https://github.com/lawben edited https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Lawrence Benson (lawben) Changes Adds a new `__builtin_vectorelements()` function which returns the number of elements for a given vector either at compile-time for fixed-sized vectors, e.g., created via `__attribute__((vector_siz

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
lawben wrote: @erichkeane This is my first PR to the frontend side of LLVM. Please let me know if there is something missing for a Clang PR that I should add. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lis

[libunwind] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread Martin Storsjö via cfe-commits
@@ -642,18 +642,8 @@ get_sanitizer_flags(SANITIZER_FLAGS "${LLVM_USE_SANITIZER}") # Link system libraries === function(cxx_link_system_libraries target) - -# In order to remove just libc++ from the link step -# we need to us

[clang] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread Martin Storsjö via cfe-commits
@@ -642,18 +642,8 @@ get_sanitizer_flags(SANITIZER_FLAGS "${LLVM_USE_SANITIZER}") # Link system libraries === function(cxx_link_system_libraries target) - -# In order to remove just libc++ from the link step -# we need to us

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 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 05bde3cc23b05a8ee4a77d00e6c4bea2ac44647b 6e8f1f0ea3777fb143ab7bc93be46a4e4c331983 --

[clang] clangd: Show argument names for function pointer struct fields (PR #69011)

2023-10-13 Thread via cfe-commits
https://github.com/Qwinci created https://github.com/llvm/llvm-project/pull/69011 Show argument names in signature help when calling a function pointer struct field. >From 1e4b524f4514fcde8d98dbd6448477b82bd3d780 Mon Sep 17 00:00:00 2001 From: Qwinci <32550582+qwi...@users.noreply.github.com>

[clang] clangd: Show argument names for function pointer struct fields (PR #69011)

2023-10-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: None (Qwinci) Changes Show argument names in signature help when calling a function pointer struct field. --- Full diff: https://github.com/llvm/llvm-project/pull/69011.diff 2 Files Affected: - (modified) clang-tools-extra/clangd/unit

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 1/5] Add __builtin_vectorelements to get the number of elements

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
https://github.com/lawben updated https://github.com/llvm/llvm-project/pull/69010 >From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001 From: Lawrence Benson Date: Wed, 11 Oct 2023 17:26:11 +0200 Subject: [PATCH 1/5] Add __builtin_vectorelements to get the number of elements

[clang] [clang][ExprConst] Fix crash on uninitialized array subobject (PR #67817)

2023-10-13 Thread Aaron Ballman via cfe-commits
@@ -2411,10 +2411,15 @@ static bool CheckEvaluationResult(CheckEvaluationResultKind CERK, const FieldDecl *SubobjectDecl, CheckedTemporaries &CheckedTemps) { if (!Value.hasValue()) { -assert(SubobjectDec

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +//

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -13595,6 +13595,15 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( Info.Ctx.getOpenMPDefaultSimdAlign(E->getArgumentType())) .getQuantity(), E); + case UETT_VectorElements: { +QualType Ty = E->getTypeOfArgument(); +//

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -triple aarch64 -fsyntax-only -verify %s + +void test_builtin_vectorelements() { + __builtin_vectorelements(int); // expected-error {{'__builtin_vectorelements' argument must be a vector}} + __builtin_vectorelements(float); // expected-error

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error< def err_vsx_builtin_nonconstant_argument : Error< "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; +def err_vectorelements_non_vector : Error< + "'__builtin_vectorelements' arg

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o - | FileCheck --check-prefixes=CHECK,NEON %s erichkeane wrote: Add -disable-llvm-passes to all of these. https://github.com/llvm/llvm-project/pull/69010 ___

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -5456,9 +5459,8 @@ class DeducedTemplateSpecializationType : public DeducedType, /// TemplateArguments, followed by a QualType representing the /// non-canonical aliased type when the template is a type alias /// template. -class alignas(8) TemplateSpecializationType -:

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +//

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -4351,6 +4352,17 @@ static bool CheckVecStepTraitOperandType(Sema &S, QualType T, return false; } +static bool CheckVectorElementsTraitOperandType(Sema &S, QualType T, +SourceLocation Loc, +

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -13595,6 +13595,15 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr( Info.Ctx.getOpenMPDefaultSimdAlign(E->getArgumentType())) .getQuantity(), E); + case UETT_VectorElements: { +QualType Ty = E->getTypeOfArgument(); +//

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error< def err_vsx_builtin_nonconstant_argument : Error< "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; +def err_vectorelements_non_vector : Error< + "'__builtin_vectorelements' arg

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -5456,9 +5459,8 @@ class DeducedTemplateSpecializationType : public DeducedType, /// TemplateArguments, followed by a QualType representing the /// non-canonical aliased type when the template is a type alias /// template. -class alignas(8) TemplateSpecializationType -:

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr( E->getTypeOfArgument()->getPointeeType())) .getQuantity(); return llvm::ConstantInt::get(CGF.SizeTy, Alignment); + } else if (E->getKind() == UETT_VectorElements) { +//

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -0,0 +1,121 @@ +// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o - | FileCheck --check-prefixes=CHECK,NEON %s erichkeane wrote: Add -disable-llvm-passes to all of these. https://github.com/llvm/llvm-project/pull/69010 ___

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error< def err_vsx_builtin_nonconstant_argument : Error< "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; +def err_vectorelements_non_vector : Error< + "'__builtin_vectorelements' arg

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
@@ -5456,9 +5459,8 @@ class DeducedTemplateSpecializationType : public DeducedType, /// TemplateArguments, followed by a QualType representing the /// non-canonical aliased type when the template is a type alias /// template. -class alignas(8) TemplateSpecializationType -:

[clang-tools-extra] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
erichkeane wrote: Also, needs a release note. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Erich Keane via cfe-commits
erichkeane wrote: Also, needs a release note. https://github.com/llvm/llvm-project/pull/69010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Better bitfield access units (PR #65742)

2023-10-13 Thread Nigel Perks via cfe-commits
nigelp-xmos wrote: XCore: yes the current setting of the new flag, the default false value, is right for XCore. Misaligned loads can generate a function call. We do not have benchmarks as such, but comparing the code generated for the test files touched here, there is an improvement. In partic

[clang] [TSAN] add support for riscv64 (PR #68735)

2023-10-13 Thread via cfe-commits
hiraditya wrote: Ah that's unfortunate.; sorry about that. In my local copy of git log (before merging) ``` commit 5b85613483861b3734edf9c94be390f2b3b0dd2a (HEAD -> riscv_tsan) Author: Alex Fan Date: Fri Oct 6 12:32:38 2023 -0700 ``` so i thought github would respect that. https://github.c

[clang] [InstCombine] Refactor matchFunnelShift to allow more pattern (NFC) (PR #68474)

2023-10-13 Thread via cfe-commits
@@ -2732,100 +2732,114 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { // rotate matching code under visitSelect and visitTrunc? unsigned Width = Or.getType()->getScalarSizeInBits(); - // First, find an or'd pair of opposite shifts: - //

[clang-tools-extra] [InstCombine] Refactor matchFunnelShift to allow more pattern (NFC) (PR #68474)

2023-10-13 Thread via cfe-commits
@@ -2732,100 +2732,114 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { // rotate matching code under visitSelect and visitTrunc? unsigned Width = Or.getType()->getScalarSizeInBits(); - // First, find an or'd pair of opposite shifts: - //

[clang] [clang][Interp] Add explicit dummy descriptors (PR #68888)

2023-10-13 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/6 >From 538bc1a046c8bf3837935ff3403b304a636ed557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 12 Oct 2023 15:27:38 +0200 Subject: [PATC

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-13 Thread Craig Topper via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW updated https://github.com/llvm/llvm-project/pull/68941 >From 877111a139b2f01037fdbe7c0cb120a2f4e64562 Mon Sep 17 00:00:00 2001 From: hanhanW Date: Thu, 12 Oct 2023 17:14:29 -0700 Subject: [PATCH 1/2] Reland "[mlir][arith] Canonicalization patterns for `arith.select`

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
@@ -233,6 +233,52 @@ def CmpIExtUI : CPred<"$0.getValue() == arith::CmpIPredicate::eq || " "$0.getValue() == arith::CmpIPredicate::ne">> $pred)]>; +//===--===// +// SelectOp +//==

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/66968 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. This is starting to look really good! Note to self: still need to dive into the implementation of most algorithms, but we discussed `for_each` and offloading conditions in some details. https://github.com/llvm/llvm-project/pull

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -291,10 +291,13 @@ option(LIBCXX_HAS_EXTERNAL_THREAD_API "Build libc++ with an externalized threading API. This option may only be set to ON when LIBCXX_ENABLE_THREADS=ON." OFF) -if (LIBCXX_ENABLE_THREADS) - set(LIBCXX_PSTL_CPU_BACKEND "std_thread" CACHE STRING "Which

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,74 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. This is starting to look really good! Note to self: still need to dive into the implementation of most algorithms, but we discussed `for_each` and offloading conditions in some details. https://github.com/llvm/llvm-project/pull

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] Reland "[mlir][arith] Canonicalization patterns for `arith.select` (#67809)" (PR #68941)

2023-10-13 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW edited https://github.com/llvm/llvm-project/pull/68941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang-tools-extra] Adding Separate OpenMP Offloading Backend to `libcxx/include/__algorithm/pstl_backends` (PR #66968)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,349 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[clang] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
@@ -5456,9 +5459,8 @@ class DeducedTemplateSpecializationType : public DeducedType, /// TemplateArguments, followed by a QualType representing the /// non-canonical aliased type when the template is a type alias /// template. -class alignas(8) TemplateSpecializationType -:

[libunwind] [Clang] Add __builtin_vectorelements to get number of elements in vector (PR #69010)

2023-10-13 Thread Lawrence Benson via cfe-commits
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error< def err_vsx_builtin_nonconstant_argument : Error< "argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">; +def err_vectorelements_non_vector : Error< + "'__builtin_vectorelements' arg

[clang] [libc++] Move the check-generated-files job to Github Actions (PR #68920)

2023-10-13 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/68920 >From d1c371b9783777d90647b5d93b16266fe053287f Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 12 Oct 2023 10:29:40 -0700 Subject: [PATCH 1/4] [libc++] Move the check-generated-files job to Github Actions

[clang] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -642,18 +642,8 @@ get_sanitizer_flags(SANITIZER_FLAGS "${LLVM_USE_SANITIZER}") # Link system libraries === function(cxx_link_system_libraries target) - -# In order to remove just libc++ from the link step -# we need to us

[libunwind] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread Louis Dionne via cfe-commits
@@ -642,18 +642,8 @@ get_sanitizer_flags(SANITIZER_FLAGS "${LLVM_USE_SANITIZER}") # Link system libraries === function(cxx_link_system_libraries target) - -# In order to remove just libc++ from the link step -# we need to us

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-13 Thread Arthur Eubanks via cfe-commits
@@ -1061,18 +1061,20 @@ def Most : DiagGroup<"most", [ ]>; // Thread Safety warnings -def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">; -def ThreadSafetyAnalysis : DiagGroup<"thread-safety-analysis">; -def ThreadSafetyPrecise: DiagGroup<"thread-safety-

[clang] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/68832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread via cfe-commits
@@ -14,14 +14,6 @@ include(CheckCSourceCompiles) # link with --uwnindlib=none. Check if that option works. llvm_check_compiler_linker_flag(C "--unwindlib=none" CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG) -if(WIN32 AND NOT MINGW) EricWF wrote: If everything passes,

[clang] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread via cfe-commits
https://github.com/EricWF approved this pull request. It's nice having CI for all the platforms, otherwise this would be harder to review and be confident about. LGTM assuming everything passes. https://github.com/llvm/llvm-project/pull/68832 ___ cfe

[clang] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread via cfe-commits
@@ -108,22 +97,18 @@ if(WIN32 AND NOT MINGW) # TODO(compnerd) do we want to support an emulation layer that allows for the # use of pthread-win32 or similar libraries to emulate pthreads on Windows? set(LIBCXX_HAS_PTHREAD_LIB NO) - set(LIBCXX_HAS_M_LIB NO) set(LIBCXX_

[libunwind] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread via cfe-commits
https://github.com/EricWF edited https://github.com/llvm/llvm-project/pull/68832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libc++] Use -nostdlib++ on GCC unconditionally (PR #68832)

2023-10-13 Thread via cfe-commits
@@ -108,22 +97,18 @@ if(WIN32 AND NOT MINGW) # TODO(compnerd) do we want to support an emulation layer that allows for the # use of pthread-win32 or similar libraries to emulate pthreads on Windows? set(LIBCXX_HAS_PTHREAD_LIB NO) - set(LIBCXX_HAS_M_LIB NO) set(LIBCXX_

[clang] [Clang] Add __datasizeof (PR #67805)

2023-10-13 Thread Aaron Ballman via cfe-commits
@@ -236,6 +236,7 @@ FEATURE(shadow_call_stack, FEATURE(tls, PP.getTargetInfo().isTLSSupported()) FEATURE(underlying_type, LangOpts.CPlusPlus) FEATURE(experimental_library, LangOpts.ExperimentalLibrary) +FEATURE(datasizeof, LangOpts.CPlusPlus) AaronBallman wrote

[clang] [Clang] Add __datasizeof (PR #67805)

2023-10-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/67805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __datasizeof (PR #67805)

2023-10-13 Thread Aaron Ballman via cfe-commits
@@ -5038,19 +5039,19 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, Out << 'a'; MangleAlignofSizeofArg(); break; +case UETT_DataSizeOf: { + Context.getDiags().Report(diag::err_cannot_mangle_expression) + << "__datasi

[clang] [Clang] Add __datasizeof (PR #67805)

2023-10-13 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think this is a reasonable minor extension, but it should come with documentation in `clang/docs/LanguageExtensions.rst` and release note in `clang/docs/ReleaseNotes.rst` before we're done. https://github.com/llvm/llvm-project/pull/67805 ___

<    1   2   3   >