[clang] [clang] fix classification of a string literal expression used as initializer (PR #101447)

2024-08-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `clang` at step 5 "compile-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/3064 Here is the relevant pie

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
ilovepi wrote: In the description, its probably better to use the `#` notation than linkify `PR`. Most of us will only see the raw text in the commit message, and while a full link is appreciated, it would be good to know the PR number at a glance. https://github.com/llvm/llvm-project/pull/10

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
@@ -473,44 +500,58 @@ def VLD3_DUP : WInst<"vld3_dup", "3(c*!)", "UcUsUiUlcsilfPcPsQcQfQiQlQsQPcQPsQUcQUiQUlQUs">; def VLD4_DUP : WInst<"vld4_dup", "4(c*!)", "UcUsUiUlcsilfPcPsQcQfQiQlQsQPcQPsQUcQUiQUlQUs">; -def VLD2_LANE : WInst<"

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
@@ -473,44 +500,58 @@ def VLD3_DUP : WInst<"vld3_dup", "3(c*!)", "UcUsUiUlcsilfPcPsQcQfQiQlQsQPcQPsQUcQUiQUlQUs">; def VLD4_DUP : WInst<"vld4_dup", "4(c*!)", "UcUsUiUlcsilfPcPsQcQfQiQlQsQPcQPsQUcQUiQUlQUs">; -def VLD2_LANE : WInst<"

[clang] [C11] Claim conformance to WG14 N1396 (PR #101214)

2024-08-01 Thread Joshua Cranmer via cfe-commits
https://github.com/jcranmer-intel approved this pull request. https://github.com/llvm/llvm-project/pull/101214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101387 >From 3ec4d5b9e5bc24bfb466d65fd9c45c51fa6d3e94 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 31 Jul 2024 14:52:11 -0400 Subject: [PATCH 01/13] [clang-doc] uncomment unsupported --- clang-tools-extra/

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101387 >From 3ec4d5b9e5bc24bfb466d65fd9c45c51fa6d3e94 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 31 Jul 2024 14:52:11 -0400 Subject: [PATCH 01/13] [clang-doc] uncomment unsupported --- clang-tools-extra/

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -270,10 +273,12 @@ struct Info { virtual ~Info() = default; + Info &operator=(Info &&Other) = default; + SymbolID USR = SymbolID(); // Unique identifier for the decl described by this Info. - const InfoType IT = InfoType::IT_default; // InfoType of this parti

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/101387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -205,6 +205,22 @@ llvm::Error getHtmlAssetFiles(const char *Argv0, return getDefaultAssetFiles(Argv0, CDCtx); } +/// Make the output of clang-doc deterministic by sorting the children of +/// namespaces and records. +void sortUsrToInfo(llvm::StringMap> &USRToInfo) { + fo

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang] [llvm] [Clang] Fix nomerge attribute not working with __builtin_trap(), __debugbreak(), __builtin_verbose_trap() (PR #101549)

2024-08-01 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/101549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Fix nomerge attribute not working with __builtin_trap(), __debugbreak(), __builtin_verbose_trap() (PR #101549)

2024-08-01 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Richard had a comment on the original which I think it still relevant: > > > There are 496 calls to Builder.CreateCall in clang's CodeGen. Do they all > > need this change? If not, how can we be confident we've found all the ones > > that do? (From a quick check, at least MSV

[clang] [llvm] [Clang] Fix nomerge attribute not working with __builtin_trap(), __debugbreak(), __builtin_verbose_trap() (PR #101549)

2024-08-01 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/101549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 5e84646 - [Clang] Fix nomerge attribute not working with __builtin_trap(), __debugbreak(), __builtin_verbose_trap() (#101549)

2024-08-01 Thread via cfe-commits
Author: Zequan Wu Date: 2024-08-01T16:13:39-04:00 New Revision: 5e84646982d1ec9bc94e48dde4b47f03c044a156 URL: https://github.com/llvm/llvm-project/commit/5e84646982d1ec9bc94e48dde4b47f03c044a156 DIFF: https://github.com/llvm/llvm-project/commit/5e84646982d1ec9bc94e48dde4b47f03c044a156.diff LOG

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
@@ -270,10 +273,12 @@ struct Info { virtual ~Info() = default; + Info &operator=(Info &&Other) = default; + SymbolID USR = SymbolID(); // Unique identifier for the decl described by this Info. - const InfoType IT = InfoType::IT_default; // InfoType of this parti

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
@@ -1011,8 +1071,10 @@ def VMLS_LANEQ : IOpInst<"vmls_laneq", "...QI", let isLaneQ = 1; } -def VFMA_LANE: IInst<"vfma_lane", "...qI", "fdQfQd">; -def VFMA_LANEQ : IInst<"vfma_laneq", "...QI", "fdQfQd"> { +def VFMA_LANE: IInst<"vfma_lane", "...qI", "fdQfQd", +

[clang] [llvm] Add length builtins and length HLSL function to DirectX Backend (PR #101256)

2024-08-01 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,10 @@ +; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s + +; DXIL operation length does not support double overload type +; CHECK: LLVM ERROR: Invalid Overload + +define noundef double @test_length_double2(<2 x double> nou

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

2024-08-01 Thread via cfe-commits
@@ -7842,6 +7853,61 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +assert(!OrigLoop->isLoopExiting(Src) && + all_of(successors(Src),

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

2024-08-01 Thread via cfe-commits
@@ -7842,6 +7853,61 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +assert(!OrigLoop->isLoopExiting(Src) && + all_of(successors(Src),

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

2024-08-01 Thread via cfe-commits
@@ -7842,6 +7853,61 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +assert(!OrigLoop->isLoopExiting(Src) && + all_of(successors(Src),

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

2024-08-01 Thread via cfe-commits
@@ -7763,6 +7763,41 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +// Create mask where the terminator in Src is a switch. We need to handle 2

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

2024-08-01 Thread via cfe-commits
@@ -7842,6 +7853,61 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +assert(!OrigLoop->isLoopExiting(Src) && + all_of(successors(Src),

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

2024-08-01 Thread via cfe-commits
@@ -7842,6 +7853,61 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +assert(!OrigLoop->isLoopExiting(Src) && + all_of(successors(Src),

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

2024-08-01 Thread via cfe-commits
@@ -7842,6 +7853,61 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) { VPValue *SrcMask = getBlockInMask(Src); + if (auto *SI = dyn_cast(Src->getTerminator())) { +assert(!OrigLoop->isLoopExiting(Src) && + all_of(successors(Src),

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

2024-08-01 Thread via cfe-commits
@@ -6,9 +6,43 @@ define void @switch_default_to_latch_common_dest(ptr %start, ptr %end) { ; IC1-LABEL: define void @switch_default_to_latch_common_dest( ; IC1-SAME: ptr [[START:%.*]], ptr [[END:%.*]]) #[[ATTR0:[0-9]+]] { ; IC1-NEXT: [[ENTRY:.*]]: +; IC1-NEXT:[[START2:%.*]

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson deleted https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
https://github.com/SpencerAbson deleted https://github.com/llvm/llvm-project/pull/100278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add customisable immediate range checking to NEON (PR #100278)

2024-08-01 Thread via cfe-commits
@@ -447,19 +470,23 @@ def VST1_X3 : WInst<"vst1_x3", "v*(3!)", def VST1_X4 : WInst<"vst1_x4", "v*(4!)", "cfilsUcUiUlUsQcQfQiQlQsQUcQUiQUlQUsPcPsQPcQPs">; def VST1_LANE : WInst<"vst1_lane", "v*(.!)I", - "QUcQUsQUiQUlQcQsQiQlQfQPcQPs

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
@@ -205,6 +205,22 @@ llvm::Error getHtmlAssetFiles(const char *Argv0, return getDefaultAssetFiles(Argv0, CDCtx); } +/// Make the output of clang-doc deterministic by sorting the children of +/// namespaces and records. +void sortUsrToInfo(llvm::StringMap> &USRToInfo) { + fo

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101387 >From 3ec4d5b9e5bc24bfb466d65fd9c45c51fa6d3e94 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 31 Jul 2024 14:52:11 -0400 Subject: [PATCH 01/14] [clang-doc] uncomment unsupported --- clang-tools-extra/

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/101387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Julian Brown via cfe-commits
https://github.com/jtb20 updated https://github.com/llvm/llvm-project/pull/92731 >From 73257cd3390361fa71735a39290dd47427916734 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Thu, 1 Aug 2024 14:49:28 -0500 Subject: [PATCH 1/8] [OpenMP][clang] Add 'holds' clause for 'omp assume' directive --

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Julian Brown via cfe-commits
jtb20 wrote: The compiler builds for each intermediate step, but the result isn't necessarily useful until the 'omp assume' patch. https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -205,6 +205,22 @@ llvm::Error getHtmlAssetFiles(const char *Argv0, return getDefaultAssetFiles(Argv0, CDCtx); } +/// Make the output of clang-doc deterministic by sorting the children of +/// namespaces and records. +void sortUsrToInfo(llvm::StringMap> &USRToInfo) { + fo

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101387 >From 3ec4d5b9e5bc24bfb466d65fd9c45c51fa6d3e94 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 31 Jul 2024 14:52:11 -0400 Subject: [PATCH 01/14] [clang-doc] uncomment unsupported --- clang-tools-extra/

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101387 >From 3ec4d5b9e5bc24bfb466d65fd9c45c51fa6d3e94 Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Wed, 31 Jul 2024 14:52:11 -0400 Subject: [PATCH 01/14] [clang-doc] uncomment unsupported --- clang-tools-extra/

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread Paul Kirth via cfe-commits
@@ -312,6 +317,16 @@ struct SymbolInfo : public Info { std::optional DefLoc; // Location where this decl is defined. llvm::SmallVector Loc; // Locations where this decl is declared. + + bool operator<(const SymbolInfo &Other) const { +if (DefLoc && Other.DefLoc) {

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -1,5 +1,8 @@ // RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.6-library -S -fnative-half-type -finclude-default-header -o - -ast-dump %s | FileCheck %s // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -967,6 +967,10 @@ static void checkUndefinedButUsed(Sema &S) { Func->getIdentifier()->isMangledOpenMPVariantName(); } } + // Do not warn on undefined internal functions in HLSL, they will get hekota wrote: Good

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
@@ -205,6 +205,22 @@ llvm::Error getHtmlAssetFiles(const char *Argv0, return getDefaultAssetFiles(Argv0, CDCtx); } +/// Make the output of clang-doc deterministic by sorting the children of +/// namespaces and records. +void sortUsrToInfo(llvm::StringMap> &USRToInfo) { + fo

[clang-tools-extra] [clang-doc] fix flaky test in clang-doc (PR #101387)

2024-08-01 Thread via cfe-commits
https://github.com/PeterChou1 edited https://github.com/llvm/llvm-project/pull/101387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix get_exception_specification_kind (PR #101548)

2024-08-01 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: > @Endilll I found another bug on the way, so here's a fix+test. Does this need > a release note under `Python Binding Changes`? Yes, the general approach is that every change should come with a test and a release note. On a different note, I wonder if there's a way to prevent

[clang] 667598d - Revert "[Clang] Fix nomerge attribute not working with __builtin_trap(), __debugbreak(), __builtin_verbose_trap() (#101549)"

2024-08-01 Thread Haowei Wu via cfe-commits
Author: Haowei Wu Date: 2024-08-01T14:46:36-07:00 New Revision: 667598d84b16d1789ce90b231565e9e7bfdbe77d URL: https://github.com/llvm/llvm-project/commit/667598d84b16d1789ce90b231565e9e7bfdbe77d DIFF: https://github.com/llvm/llvm-project/commit/667598d84b16d1789ce90b231565e9e7bfdbe77d.diff LOG

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -10,8 +10,9 @@ // //===--===// -#include "clang/AST/ASTContext.h" #include "clang/AST/StmtOpenMP.h" +#include "clang/AST/ASTContext.h" alexey-bataev wrote: Do this reordering in a separa

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -9487,13 +9606,17 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, unsigned NestedLoopCount = 1; bool SupportsNonPerfectlyNested = (SemaRef.LangOpts.OpenMP >= 50) && !isOpenMPLoopTransformationDirective(DKin

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-08-01 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 154d3505ab13275086b3dffed67bcdcac52f79a3 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/6] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-01 Thread Damyan Pepper via cfe-commits
@@ -280,18 +280,22 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) { const auto *RD = Ty->getAsCXXRecordDecl(); if (!RD) return; - const auto *HLSLResAttr = RD->getAttr(); - const auto *HLSLResClassAttr = RD->getAttr(); - if (!HLSLR

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -6468,6 +6468,36 @@ class OMPErrorDirective final : public OMPExecutableDirective { return T->getStmtClass() == OMPErrorDirectiveClass; } }; + +// It's not really an executable directive, but it seems convenient to use +// that as the parent class. +class OMPAssumeDir

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -377,6 +377,8 @@ bool checkFailClauseParameter(OpenMPClauseKind FailClauseParameter); /// otherwise - false. bool isOpenMPExecutableDirective(OpenMPDirectiveKind DKind); +bool isOpenMPInformationalDirective(OpenMPDirectiveKind DKind); alexey-bataev wrote:

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Need a test with the nesting of the directives https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-01 Thread Damyan Pepper via cfe-commits
@@ -280,18 +280,22 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) { const auto *RD = Ty->getAsCXXRecordDecl(); if (!RD) return; - const auto *HLSLResAttr = RD->getAttr(); - const auto *HLSLResClassAttr = RD->getAttr(); - if (!HLSLR

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-01 Thread Damyan Pepper via cfe-commits
@@ -112,17 +113,13 @@ struct BuiltinTypeDeclBuilder { Ty = Record->getASTContext().getPointerType( QualType(TTD->getTypeForDecl(), 0)); } -return addMemberVariable("h", Ty, Access); - } - - BuiltinTypeDeclBuilder &annotateHLSLResource(ResourceClass

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-01 Thread Joshua Batista via cfe-commits
@@ -280,18 +280,22 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) { const auto *RD = Ty->getAsCXXRecordDecl(); if (!RD) return; - const auto *HLSLResAttr = RD->getAttr(); - const auto *HLSLResClassAttr = RD->getAttr(); - if (!HLSLR

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-01 Thread Damyan Pepper via cfe-commits
@@ -280,18 +280,22 @@ void CGHLSLRuntime::annotateHLSLResource(const VarDecl *D, GlobalVariable *GV) { const auto *RD = Ty->getAsCXXRecordDecl(); if (!RD) return; - const auto *HLSLResAttr = RD->getAttr(); - const auto *HLSLResClassAttr = RD->getAttr(); - if (!HLSLR

[clang-tools-extra] Create a new check to look for mis-use in calls that take iterators (PR #99917)

2024-08-01 Thread Nathan James via cfe-commits
https://github.com/njames93 updated https://github.com/llvm/llvm-project/pull/99917 >From e4d6c8e0fc65771b3fe67b0e3463f5df6115a2e3 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 23 Jul 2024 10:59:45 +0100 Subject: [PATCH] Create a new check to look for mis-use in calls that take iterat

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -119,3 +119,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -158,7 +158,8 @@ def FunctionTmpl def HLSLEntry : SubsetSubjectisExternallyVisible() && !isa(S)}], + [{S->getDeclContext()->getRedeclContext()->isFileContext() && +S->getStorageClass() != SC_Static}], hekota wrote:

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -119,3 +119,16 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -119,3 +119,49 @@ behavior between Clang and DXC. Some examples include: diagnostic notifying the user of the conversion rather than silently altering precision relative to the other overloads (as FXC does) or generating code that will fail validation (as DXC does). +

[clang] [HLSL] Change default linkage of HLSL functions and groupshared variables (v2) (PR #95331)

2024-08-01 Thread Helena Kotas via cfe-commits
@@ -353,6 +353,23 @@ llvm::Value *CGHLSLRuntime::emitInputSemantic(IRBuilder<> &B, return nullptr; } +void CGHLSLRuntime::emitFunctionProlog(const FunctionDecl *FD, + llvm::Function *Fn) { + if (!FD || !Fn) +return; + + if (FD->ha

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
https://github.com/yonghong-song edited https://github.com/llvm/llvm-project/pull/101228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: bpf-registered-target +// RUN: %clang_cc1 -triple bpf -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s + +#define __bpf_fastcall __attribute__((bpf_fastcall)) + +void test(void) __bpf_fastcall; +void (*ptr)(void) __bpf_fastcall; + +void foo(vo

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
https://github.com/yonghong-song approved this pull request. I also tried a few examples and it looks good to me. Only a few minor comments. https://github.com/llvm/llvm-project/pull/101228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: bpf-registered-target +// RUN: %clang_cc1 -triple bpf -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s + +#define __bpf_fastcall __attribute__((bpf_fastcall)) + +void test(void) __bpf_fastcall; +void (*ptr)(void) __bpf_fastcall; + +void foo(vo

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
@@ -0,0 +1,24 @@ +// REQUIRES: bpf-registered-target +// RUN: %clang_cc1 -triple bpf -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s + +#define __bpf_fastcall __attribute__((bpf_fastcall)) + +void test(void) __bpf_fastcall; +void (*ptr)(void) __bpf_fastcall; + +void foo(vo

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
@@ -596,6 +600,90 @@ bool BPFMIPreEmitPeephole::adjustBranch() { return Changed; } +static const unsigned CallerSavedRegs[] = {BPF::R0, BPF::R1, BPF::R2, + BPF::R3, BPF::R4, BPF::R5}; + +struct BPFFastCall { + MachineInstr *MI; + u

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
@@ -596,6 +600,90 @@ bool BPFMIPreEmitPeephole::adjustBranch() { return Changed; } +static const unsigned CallerSavedRegs[] = {BPF::R0, BPF::R1, BPF::R2, + BPF::R3, BPF::R4, BPF::R5}; + +struct BPFFastCall { + MachineInstr *MI; + u

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-08-01 Thread via cfe-commits
@@ -596,6 +600,90 @@ bool BPFMIPreEmitPeephole::adjustBranch() { return Changed; } +static const unsigned CallerSavedRegs[] = {BPF::R0, BPF::R1, BPF::R2, + BPF::R3, BPF::R4, BPF::R5}; + +struct BPFFastCall { + MachineInstr *MI; + u

[clang] [HLSL] cleanup builtin names elementwise usage (PR #101543)

2024-08-01 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/101543 >From 7664c3ea206a2c2e851b8d925c377af6e4bb6e11 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 1 Aug 2024 14:55:14 -0400 Subject: [PATCH 1/2] [HLSL] cleanup builtin names used by HLSL Remove elementwise

[clang] ae6dc64 - Reapply "[Clang] Fix nomerge attribute not working with __builtin_trap(), __debugbreak(), __builtin_verbose_trap() (#101549)"

2024-08-01 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2024-08-01T15:54:50-07:00 New Revision: ae6dc64ec670891cb15049277e43133d4df7fb4b URL: https://github.com/llvm/llvm-project/commit/ae6dc64ec670891cb15049277e43133d4df7fb4b DIFF: https://github.com/llvm/llvm-project/commit/ae6dc64ec670891cb15049277e43133d4df7fb4b.diff LOG

[clang] [llvm] [Clang] Fix nomerge attribute not working with __builtin_trap(), __debugbreak(), __builtin_verbose_trap() (PR #101549)

2024-08-01 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Thanks for reporting. Those tests are failed due to not updated properly. I relanded this change with updated tests: https://github.com/llvm/llvm-project/commit/ae6dc64ec670891cb15049277e43133d4df7fb4b. https://github.com/llvm/llvm-project/pull/101549 __

[clang] Attach resource attributes to handle within record, instead of record (PR #101433)

2024-08-01 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/101433 >From b17ddcc6f2081135125d6178b22d033bcf7c0998 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 31 Jul 2024 17:01:56 -0700 Subject: [PATCH 1/4] add attrs to handle in record decl, add ast dump test to

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/99732 >From 27422f2fb7f6986589df0a5173899c1a39cc011b Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 19 Jul 2024 22:07:06 -0400 Subject: [PATCH] [Clang][OpenMP] Allow `num_teams` to accept multiple expressions

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-01 Thread Shilei Tian via cfe-commits
shiltian wrote: > Update OpenMPSupport.rst and include info about changes to release notes This is not part of OpenMP standard so I don't think we need to update `OpenMPSupport.rst`. https://github.com/llvm/llvm-project/pull/99732 ___ cfe-commits mai

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-08-01 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 154d3505ab13275086b3dffed67bcdcac52f79a3 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/7] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-01 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > > Update OpenMPSupport.rst and include info about changes to release notes > > This is not part of OpenMP standard so I don't think we need to update > `OpenMPSupport.rst`. We do not inform OpenMP committee here, just users :) For users it would be good to have this inf

[clang] 1762e01 - Fix codegen of consteval functions returning an empty class, and related issues (#93115)

2024-08-01 Thread via cfe-commits
Author: Eli Friedman Date: 2024-08-01T16:18:20-07:00 New Revision: 1762e01cca0186f1862db561cfd9019164b8c654 URL: https://github.com/llvm/llvm-project/commit/1762e01cca0186f1862db561cfd9019164b8c654 DIFF: https://github.com/llvm/llvm-project/commit/1762e01cca0186f1862db561cfd9019164b8c654.diff

[clang] Fix codegen of consteval functions returning an empty class, and related issues (PR #93115)

2024-08-01 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic closed https://github.com/llvm/llvm-project/pull/93115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-01 Thread Shilei Tian via cfe-commits
shiltian wrote: Ah, we don't even have an entry for `ompx_bare` in `OpenMPSupport.rst`. I will do a follow-up patch to add it there. https://github.com/llvm/llvm-project/pull/99732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

<    1   2   3   4   5   6   >