[clang] [clang][bytecode] Fix a problem with array size limits (PR #109383)

2024-09-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/109383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9a32f28 - [clang][bytecode] Fix a problem with array size limits (#109383)

2024-09-20 Thread via cfe-commits
Author: Timm Baeder Date: 2024-09-20T11:26:58+02:00 New Revision: 9a32f28366b1099b0f5214e62473c0a2a2155434 URL: https://github.com/llvm/llvm-project/commit/9a32f28366b1099b0f5214e62473c0a2a2155434 DIFF: https://github.com/llvm/llvm-project/commit/9a32f28366b1099b0f5214e62473c0a2a2155434.diff L

[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-20 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts closed https://github.com/llvm/llvm-project/pull/107408 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: It looks like this change causes regressions in sinking/hoisting, because we currently can't handle identical calls with different call site attributes. Basic example: https://llvm.godbolt.org/z/5dTcTfs1x We need to extend the attribute intersection support to call attributes. It'

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-20 Thread Michael Buch via cfe-commits
@@ -738,7 +738,7 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { // Zero-sized fields are not emitted, but their initializers may still // prevent emission of this struct as a constant. if (isEmptyFieldForLayout(CGM.getContext(), F

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-20 Thread Michael Buch via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK +// RUN: %clang_cc1 -x c++ %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK-CXX + +union Foo { + struct Empty {} val; +}; + +u

[clang] [compiler-rt] [llvm] [FMV][AArch64] Unify ls64, ls64_v and ls64_accdata. (PR #108024)

2024-09-20 Thread Alexandros Lamprineas via cfe-commits
labrinea wrote: Just letting you know that I have reopened https://github.com/llvm/llvm-project/pull/101712 as a draft just to demonstrate that backwards compatibility can be preserved if we split the features (previously I thought it wasn't possible, but I found a way). However I couldn't co

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/99620 >From 46ab5f809414b3f06ab9956e0fc6910284417b6d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 19 Jul 2024 11:02:56 +0200 Subject: [PATCH 1/3] [CVP] Infer range return attribute We already infer this in IPSC

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Vyacheslav Levytskyy via cfe-commits
@@ -0,0 +1,163 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unkno

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-20 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/109271 >From 6d541092e00f0c59861ad17c8bf6988d849c42f0 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 19 Sep 2024 11:41:51 +0100 Subject: [PATCH 1/2] [clang][CodeGen] Check initializer of zero-size fields fo

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -1289,6 +1299,14 @@ static bool runImpl(Function &F, LazyValueInfo *LVI, DominatorTree *DT, FnChanged |= BBChanged; } + // Infer range attribute on return value. + if (RetRange && !RetRange->isFullSet()) { +Attribute RangeAttr = F.getRetAttribute(Attribute::Ran

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Vyacheslav Levytskyy via cfe-commits
@@ -766,8 +766,19 @@ static void EmitAtomicOp(CodeGenFunction &CGF, AtomicExpr *Expr, Address Dest, // LLVM atomic instructions always have synch scope. If clang atomic // expression has no scope operand, use default LLVM synch scope. if (!ScopeModel) { +llvm::SyncSc

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Vyacheslav Levytskyy via cfe-commits
@@ -251,6 +251,24 @@ SPIRV::MemorySemantics::MemorySemantics getMemSemantics(AtomicOrdering Ord) { llvm_unreachable(nullptr); } +SPIRV::Scope::Scope getMemScope(const LLVMContext &Ctx, SyncScope::ID ID) { VyacheslavLevytskyy wrote: No problems, I'm quite h

[clang] 3127b65 - [CVP] Infer range return attribute (#99620)

2024-09-20 Thread via cfe-commits
Author: Nikita Popov Date: 2024-09-20T14:29:19+02:00 New Revision: 3127b659fad358b135721bd937fead49e5c73de5 URL: https://github.com/llvm/llvm-project/commit/3127b659fad358b135721bd937fead49e5c73de5 DIFF: https://github.com/llvm/llvm-project/commit/3127b659fad358b135721bd937fead49e5c73de5.diff

[clang] [clang] Code owners -> Maintainers transition (PR #108997)

2024-09-20 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/108997 >From 10f74046b87f67a6efba1ee30806e73eea14007e Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 16 Sep 2024 08:59:45 -0400 Subject: [PATCH 1/2] [clang] Code owners -> Maintainers transition This is

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/99620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen][SPIR-V] (PR #109415)

2024-09-20 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx created https://github.com/llvm/llvm-project/pull/109415 This is primarily meant to address the issue identified in #109182, around incorrect usage of `-fsycl-is-device`; we now have AMDGCN flavoured SPIR-V which retains the desired behaviour around the default AS an

[clang] [clang][CodeGen][SPIR-V] (PR #109415)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes This is primarily meant to address the issue identified in #109182, around incorrect usage of `-fsycl-is-device`; we now have AMDGCN flavoured SPIR-V which retains the desired behaviour around the default AS a

[clang] [clang][CodeGen][SPIR-V] (PR #109415)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alex Voicu (AlexVlx) Changes This is primarily meant to address the issue identified in #109182, around incorrect usage of `-fsycl-is-device`; we now have AMDGCN flavoured SPIR-V which retains the desired behaviour around the defa

[clang] [clang] Code owners -> Maintainers transition (PR #108997)

2024-09-20 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > FWIW, I plan to land these changes tomorrow morning. I lied. :-D I just emailed both Manuel and Michael privately and I want them to have some time to consider and respond before landing the changes, but I did make anticipatory changes. https://github.com/llvm/llvm-proje

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-20 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/109415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Remove incorrect SYCL tests (PR #109182)

2024-09-20 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > Ah, I remember now why the SYCL flag / mode was abused here (the default AS > > Map for SPIR-V is problematic in this case); I believe that using the > > `spirv64-amd-amdhsa` triple instead of `spirv64-unknown-unknown` will work, > > and allow for the removal of the SYCL ref

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-20 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 2c90eb990af176f2b57baecd2920481243845bb9 75ca598c7e8a583545f50ee2c526556df261cc7f --e

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/80309 >From 511445e35376c904be454ed987786cb6faa70a81 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 19 Sep 2024 17:27:13 +0200 Subject: [PATCH] apint only --- clang/lib/AST/ByteCode/IntegralAP.h | 6 +

[clang] [clang][CodeGen][SPIR-V] Fix incorrect SYCL usage, implement missing interface (PR #109415)

2024-09-20 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/109415 >From 75ca598c7e8a583545f50ee2c526556df261cc7f Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 20 Sep 2024 13:25:49 +0100 Subject: [PATCH 1/2] Implement `getGlobalVarAddressSpace` for SPIR-V; stop using SY

[clang] [Clang] Automatically link the `compiler-rt` for GPUs if present (PR #109152)

2024-09-20 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: I ran this through a buildbot config and found no errors. https://github.com/llvm/llvm-project/pull/109152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] WebKit Checkers should set DeclWithIssue. (PR #109389)

2024-09-20 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 fd21b7911fbdddc80db2d3971ff10ee70a49b7e3 b8f95b5b809cbeb8199de6cd24e18a605189f722 --e

[clang] WebKit Checkers should set DeclWithIssue. (PR #109389)

2024-09-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/109389 >From b8f95b5b809cbeb8199de6cd24e18a605189f722 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 19 Sep 2024 23:41:10 -0700 Subject: [PATCH 1/2] WebKit Checkers should set DeclWithIssue. Set DeclWithIssue in

[clang] WebKit Checkers should set DeclWithIssue. (PR #109389)

2024-09-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/109389 Set DeclWithIssue in alpha.webkit.UncountedCallArgsChecker and alpha.webkit.UncountedLocalVarsChecker. >From b8f95b5b809cbeb8199de6cd24e18a605189f722 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 19 Sep

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-20 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/109255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] WebKit Checkers should set DeclWithIssue. (PR #109389)

2024-09-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/109389 >From b8f95b5b809cbeb8199de6cd24e18a605189f722 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Thu, 19 Sep 2024 23:41:10 -0700 Subject: [PATCH 1/3] WebKit Checkers should set DeclWithIssue. Set DeclWithIssue in

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-20 Thread via cfe-commits
eddyz87 wrote: @peilin-ye, > I couldn't find a way to generate a better error message for > `__ATOMIC_SEQ_CST`, however; it seems that CodeGen simply calls > `CannotYetSelect()` if nothing in `MatcherTable` matches. Any suggestions? There is probably some tablegen incantation to invoke custom

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet edited https://github.com/llvm/llvm-project/pull/107906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Correctly use the auxiliary toolchain to include libc++ (PR #109366)

2024-09-20 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > The fix looks good. A test would be preferred. Done https://github.com/llvm/llvm-project/pull/109366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: i've also just noticed https://github.com/llvm/llvm-project/commit/3b3accb598ec87a6a30b0e18ded06071030bb78f, which seem to be pushed without review and any tests, changing behavior more in a non-obvious way. Please not that logic you have in: ``` Expected FDOrErr = sys::fs::o

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
@@ -323,10 +325,11 @@ ErrorOr RealFileSystem::status(const Twine &Path) { } ErrorOr> -RealFileSystem::openFileForRead(const Twine &Name) { +RealFileSystem::openFileForRead(const Twine &Name, bool IsText) { SmallString<256> RealName, Storage; Expected FDOrErr = sys::fs::

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
@@ -121,8 +121,18 @@ ContentCache::getBufferOrNone(DiagnosticsEngine &Diag, FileManager &FM, // Start with the assumption that the buffer is invalid to simplify early // return paths. IsBufferInvalid = true; - - auto BufferOrError = FM.getBufferForFile(*ContentsEntry, I

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet commented: hi sorry for missing this during the review time, i believe this change is changing some of the core support library interfaces in a way that's not justified. this is an interface implemented by quite a lot of both upstream and downstream clients, but th

[clang] [lldb] [llvm] [mlir] [APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (PR #80309)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -1806,7 +1806,7 @@ bool AMDGPUDAGToDAGISel::SelectGlobalSAddr(SDNode *N, // instructions to perform VALU adds with immediates or inline literals. unsigned NumLiterals = !TII->isInlineConstant(APInt(32, COffsetVal & 0x)) + - !TII->isInli

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread Abhina Sree via cfe-commits
abhina-sree wrote: > 3b3accb Hi, sure I will revert the two changes so we can discuss further. The OF_Text flag only affects the z/OS platform behaviour, the OF_TextWithCRLF will affect z/OS and Windows. On other platforms, the flag doesn't show any difference in behaviour that I'm aware of

[clang-tools-extra] efdb3ae - Revert "[SystemZ][z/OS] Propagate IsText parameter to open text files as text (#107906)"

2024-09-20 Thread Abhina Sreeskantharajan via cfe-commits
Author: Abhina Sreeskantharajan Date: 2024-09-20T08:18:16-04:00 New Revision: efdb3ae23247850d3886e3708400f0d991ed59e1 URL: https://github.com/llvm/llvm-project/commit/efdb3ae23247850d3886e3708400f0d991ed59e1 DIFF: https://github.com/llvm/llvm-project/commit/efdb3ae23247850d3886e3708400f0d991ed

[clang] efdb3ae - Revert "[SystemZ][z/OS] Propagate IsText parameter to open text files as text (#107906)"

2024-09-20 Thread Abhina Sreeskantharajan via cfe-commits
Author: Abhina Sreeskantharajan Date: 2024-09-20T08:18:16-04:00 New Revision: efdb3ae23247850d3886e3708400f0d991ed59e1 URL: https://github.com/llvm/llvm-project/commit/efdb3ae23247850d3886e3708400f0d991ed59e1 DIFF: https://github.com/llvm/llvm-project/commit/efdb3ae23247850d3886e3708400f0d991ed

[clang] d6f9120 - Revert "[SystemZ][z/OS] Propagate IsText flag continuation"

2024-09-20 Thread Abhina Sreeskantharajan via cfe-commits
Author: Abhina Sreeskantharajan Date: 2024-09-20T08:17:45-04:00 New Revision: d6f91200fe95dbf30a091af3ba039a817e7ddf14 URL: https://github.com/llvm/llvm-project/commit/d6f91200fe95dbf30a091af3ba039a817e7ddf14 DIFF: https://github.com/llvm/llvm-project/commit/d6f91200fe95dbf30a091af3ba039a817e7d

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-09-20 Thread Matt Arsenault via cfe-commits
arsenm wrote: > @aeubanks It's not impossible to separate them completely. `MCContext` is > needed during initialization and finalization of the > `MachineModuleInfoWrapperPass` (and its new pass manager variant) to set the > diagnostics handler. > > In theory, you can just pass the context t

[clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-20 Thread Christian Kandeler via cfe-commits
https://github.com/ckandeler updated https://github.com/llvm/llvm-project/pull/67802 >From 9dd725113a156a01f1866cfefe181c1b22f7e8d0 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 29 Sep 2023 15:01:58 +0200 Subject: [PATCH] [clangd] Collect comments from function definitions into t

[clang] [alpha.webkit.UncountedCallArgsChecker] Use canonical type (PR #109393)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes This PR fixes a bug in UncountedCallArgsChecker that calling a function with a member variable which is Ref/RefPtr is erroneously treated as safe by canoniclizing t

[clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-20 Thread Christian Kandeler via cfe-commits
@@ -451,8 +451,17 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( if (LastCheckedRedecl) { if (LastCheckedRedecl == Redecl) { LastCheckedRedecl = nullptr; +continue; ckandeler wrote: Done. https://github.com/llvm/llvm-pro

[clang] [alpha.webkit.UncountedCallArgsChecker] Use canonical type (PR #109393)

2024-09-20 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/109393 This PR fixes a bug in UncountedCallArgsChecker that calling a function with a member variable which is Ref/RefPtr is erroneously treated as safe by canoniclizing the type before checking whether it's ref counted

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #109372)

2024-09-20 Thread Sven van Haastregt via cfe-commits
https://github.com/svenvh approved this pull request. https://github.com/llvm/llvm-project/pull/109372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TableGen] Avoid repeated hash lookups (NFC) (PR #109372)

2024-09-20 Thread Nikita Popov via cfe-commits
@@ -896,9 +896,8 @@ static void OCL2Qual(Sema &S, const OpenCLTypeStruct &Ty, if (ImageTypesMap.contains(T->getValueAsString("Name"))) continue; // Check we have not seen this Type -if (TypesSeen.contains(T->getValueAsString("Name"))) +if (!TypesSeen.try_e

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-09-20 Thread Nikita Popov via cfe-commits
nikic wrote: >From the last run: ``` Top 5 regressions: verilator/V3WidthSel.cpp.ll 1476069359 1597049838 +8.20% verilator/V3LinkResolve.cpp.ll 1301807129 1388286283 +6.64% opencv/gscalar.cpp.ll 203273801 211586743 +4.09% verilator/V3Clock.cpp.ll 734000737 758828622 +3.38% verilator/V3W

[clang] [clang] Lifetime of locals must end before musttail call (PR #109255)

2024-09-20 Thread Haojian Wu via cfe-commits
@@ -267,3 +267,30 @@ namespace ns {} void TestCallNonValue() { [[clang::musttail]] return ns; // expected-error {{unexpected namespace name 'ns': expected expression}} } + +// Test diagnostics for lifetimes of local variables, which end earlier for a +// musttail call than f

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Vyacheslav Levytskyy via cfe-commits
@@ -58,7 +58,35 @@ class SPIRVTargetCodeGenInfo : public CommonSPIRTargetCodeGenInfo { SPIRVTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) : CommonSPIRTargetCodeGenInfo(std::make_unique(CGT)) {} void setCUDAKernelCallingConvention(const FunctionType *&FT) const overri

[clang] [clang-tools-extra] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109403)

2024-09-20 Thread via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Carlos Galvez (carlosgalvezp) Changes The example code doesn't compile otherwise. --- Full diff: https://github.com/llvm/llvm-project/pull/109403.diff 9 Files Affected: - (adde

[clang] [clang-tools-extra] [clang][NFC] Fix example code for memberPointerType() AST matcher (PR #109403)

2024-09-20 Thread via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Carlos Galvez (carlosgalvezp) Changes The example code doesn't compile otherwise. --- Full diff: https://github.com/llvm/llvm-project/pull/109403.diff 9 Files Affected: - (added) cl

[clang] [AMDGPU] Correctly use the auxiliary toolchain to include libc++ (PR #109366)

2024-09-20 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/109366 >From f47b67c20014fbedc5ce9764be2e2687258a474e Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 19 Sep 2024 22:03:42 -0500 Subject: [PATCH] [AMDGPU] Correctly use the auxiliary toolchain to include libc++

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-20 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/108949 >From 3601f708847f70485fae640c5b5d96fed965e7c3 Mon Sep 17 00:00:00 2001 From: yronglin Date: Tue, 17 Sep 2024 17:39:47 +0800 Subject: [PATCH 1/4] [clang][bytecode] Implement arithmetic, bitwise and compound as

[clang] [clang] Fix false warning on reinterpret_casting unknown template type (PR #109430)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arseniy Zaostrovnykh (necto) Changes After 1595988ee6f9732e7ea79928af8a470ad5ef7dbe diag::warn_undefined_reinterpret_cast started raising on non-instantiated template functions without sufficient knowledge whether the reinterpret_cast is

[clang] [Clang] Prevent Copying of LateParsedClass Instances (PR #109428)

2024-09-20 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 57b12e8fbc9bb29ebe8f9d2a0f2c5085b38c2454 d792de91f9a01b927a274c83f0d2553ac06aa3cb --e

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-20 Thread via cfe-commits
yronglin wrote: Sure, added them to test. And regular binary operators works well. https://github.com/llvm/llvm-project/pull/108949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,163 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %} + +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unkno

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian edited https://github.com/llvm/llvm-project/pull/109422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-20 Thread Thomas Köppe via cfe-commits
@@ -38,7 +38,9 @@ AST_MATCHER(Type, sugaredNullptrType) { StatementMatcher makeCastSequenceMatcher(llvm::ArrayRef NameList) { auto ImplicitCastToNull = implicitCastExpr( anyOf(hasCastKind(CK_NullToPointer), hasCastKind(CK_NullToMemberPointer)), - unless(hasImplic

[clang] [llvm] [CVP] Infer range return attribute (PR #99620)

2024-09-20 Thread via cfe-commits
@@ -1289,6 +1299,14 @@ static bool runImpl(Function &F, LazyValueInfo *LVI, DominatorTree *DT, FnChanged |= BBChanged; } + // Infer range attribute on return value. + if (RetRange && !RetRange->isFullSet()) { +Attribute RangeAttr = F.getRetAttribute(Attribute::Ran

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Alex Voicu via cfe-commits
@@ -58,7 +58,35 @@ class SPIRVTargetCodeGenInfo : public CommonSPIRTargetCodeGenInfo { SPIRVTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT) : CommonSPIRTargetCodeGenInfo(std::make_unique(CGT)) {} void setCUDAKernelCallingConvention(const FunctionType *&FT) const overri

[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

2024-09-20 Thread Alex Voicu via cfe-commits
@@ -1,7 +1,7 @@ ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV ; CHECK-SPIRV: %[[#Int:]] = OpTypeInt 32 0 -; CHECK-SPIRV-DAG: %[[#MemScope_Device:]] = OpConstant %[[#Int]] 1 +; CHECK-SPIRV-DAG: %[[#MemScope_AllSvmDevic

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: thanks a lot for the swift response! I can see how none of these implementations are not using those flags _today_, but we're changing the observable behavior for them as well, and if some of those implementations decides to give meaning to these flags, it might be impossible

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-20 Thread Paul Walker via cfe-commits
@@ -567,23 +567,28 @@ static bool checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, // * When compiling for SVE only, the caller must be in non-streaming mode. // * When compiling for both SVE and SME, the caller can be in either mode. if (BuiltinType == SemaARM::Veri

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Does this need a release note? Also, can you point out the 'diff' from the previous commit? I'm really not a fan of the 'out' parameter, I'd prefer perhaps returning a `std::pair` + structured binding. WDYT? https://github.com/llvm/llvm-project/pul

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/109422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Erich Keane via cfe-commits
@@ -484,16 +484,19 @@ namespace N4 { template struct A { void not_instantiated(A a, A b, T c) { - a->x; - b->x; + a->x; // expected-error {{member reference type 'A' is not a pointer; did you mean to use '.'?}} + b->x; // expected-error {{member ref

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Erich Keane via cfe-commits
@@ -8002,15 +7991,26 @@ ExprResult Sema::ActOnStartCXXMemberReference(Scope *S, Expr *Base, return ExprError(); } + bool IsDependent; erichkeane wrote: Please initialize this to false anyway. https://github.com/llvm/llvm-project/pull/1094

[clang] Reapply "[Clang][Sema] Use the correct lookup context when building overloaded 'operator->' in the current instantiation (#104458)" (PR #109422)

2024-09-20 Thread Erich Keane via cfe-commits
@@ -10639,9 +10639,9 @@ class Sema final : public SemaBase { /// BuildOverloadedArrowExpr - Build a call to an overloaded @c operator-> /// (if one exists), where @c Base is an expression of class type and /// @c Member is the name of the member we're trying to find. -

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Congcong Cai (HerrCai0907) Changes Detect by misc-use-internal-linkage --- Full diff: https://github.com/llvm/llvm-project/pull/109431.diff 6 Files Affected: - (modified) clang/lib/CodeGen/CGBuiltin.cpp (+2-2) - (modified) cla

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/109431 Detect by misc-use-internal-linkage >From cc42a41300c3acb202635902e6746061e09e7114 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 20 Sep 2024 22:27:28 +0800 Subject: [PATCH] [codegen][NFC] add stat

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Congcong Cai (HerrCai0907) Changes Detect by misc-use-internal-linkage --- Full diff: https://github.com/llvm/llvm-project/pull/109431.diff 6 Files Affected: - (modified) clang/lib/CodeGen/CGBuiltin.cpp (+2-2) - (modified) clang/lib/C

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-20 Thread Erich Keane via cfe-commits
@@ -11392,9 +11392,9 @@ class Sema final : public SemaBase { CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, - So

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/106585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix false warning on reinterpret_casting unknown template type (PR #109430)

2024-09-20 Thread Arseniy Zaostrovnykh via cfe-commits
https://github.com/necto created https://github.com/llvm/llvm-project/pull/109430 After 1595988ee6f9732e7ea79928af8a470ad5ef7dbe diag::warn_undefined_reinterpret_cast started raising on non-instantiated template functions without sufficient knowledge whether the reinterpret_cast is indeed UB.

[clang] [Clang] Prevent Copying of LateParsedClass Instances (PR #109428)

2024-09-20 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/109428 Class clang::Parser::LateParsedClass owns resources that are freed in its destructor but has no user-written assignment operator. This commit explicitly deletes the copy constructor and copy assignment operato

[clang] [Clang] Prevent Copying of LateParsedClass Instances (PR #109428)

2024-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes Class clang::Parser::LateParsedClass owns resources that are freed in its destructor but has no user-written assignment operator. This commit explicitly deletes the copy constructor and copy assignment operator for

[clang] [Clang] Prevent Copying of LateParsedClass Instances (PR #109428)

2024-09-20 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/109428 >From d792de91f9a01b927a274c83f0d2553ac06aa3cb Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Fri, 20 Sep 2024 07:07:46 -0700 Subject: [PATCH 1/2] [Clang] Prevent Copying of LateParsedClass Instances ---

[clang] [Clang][AArch64] Fix checkArmStreamingBuiltin for 'sve-b16b16' (PR #109420)

2024-09-20 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/109420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Simplify the value printing logic to enable out-of-process. (PR #107737)

2024-09-20 Thread Vassil Vassilev via cfe-commits
@@ -53,6 +53,7 @@ class MultiplexConsumer : public SemaConsumer { public: // Takes ownership of the pointers in C. MultiplexConsumer(std::vector> C); + MultiplexConsumer(std::unique_ptr C); vgvassilev wrote: Surprisingly we can’t do this unfortunately htt

[clang] [Clang][Sema] Refactor collection of multi-level template argument lists (PR #106585)

2024-09-20 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. 1 comment, otherwise LGTM. https://github.com/llvm/llvm-project/pull/106585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-20 Thread Michael Buch via cfe-commits
@@ -738,7 +738,7 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { // Zero-sized fields are not emitted, but their initializers may still // prevent emission of this struct as a constant. if (isEmptyFieldForLayout(CGM.getContext(), F

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109431 >From d6eae7c4543e081f3a7d2e8bd33d11082c7e06cb Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 20 Sep 2024 22:27:28 +0800 Subject: [PATCH] [codegen][NFC] add static mark for internal usage variable a

[clang] [clang-tools-extra] [lldb] [llvm] [SystemZ][z/OS] Propagate IsText parameter to open text files as text (PR #107906)

2024-09-20 Thread Abhina Sree via cfe-commits
abhina-sree wrote: > thanks a lot for the swift response! > > I can see how none of these implementations are not using those flags > _today_, but we're changing the observable behavior for them as well, and if > some of those implementations decides to give meaning to these flags, it > might

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 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 9c5ad62e7440423fbcd2d84c8f0347a5f000400e d6eae7c4543e081f3a7d2e8bd33d11082c7e06cb --e

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109431 >From fdca1726b8fe9d60407e48426a513eebb81a710e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 20 Sep 2024 22:27:28 +0800 Subject: [PATCH] [codegen][NFC] add static mark for internal usage variable a

[clang] [llvm] [PAC] Fix address discrimination for type info vtable pointers (PR #102199)

2024-09-20 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: > I think you should be able to avoid constructing the initializer twice if you > restructure the code a bit to just construct the global before the call to > BuildVTablePointer. I added GlobalVariable::replaceInitializer because I was > looking at this review: it lets you cons

[clang-tools-extra] [clang-tidy][bugprone-posix-return] support integer literals as LHS (PR #109302)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109302 >From cc2c798193722b3a537c76e74981ff767d064efa Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Sep 2024 23:46:16 +0800 Subject: [PATCH 1/3] [clang-tidy][bugprone-posix-return] support integer lite

[clang-tools-extra] [clang-tidy][bugprone-posix-return] support integer literals as LHS (PR #109302)

2024-09-20 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 5e3d48a68096a0017a0fa4bb89f2d48767c8a7e4 b42278e592a9d64ba6868ee6eb5663cb8306e16b --e

[clang] [Sema] Avoid repeated hash lookups (NFC) (PR #109375)

2024-09-20 Thread Richard Howell via cfe-commits
https://github.com/rmaz approved this pull request. https://github.com/llvm/llvm-project/pull/109375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][bugprone-posix-return] support integer literals as LHS (PR #109302)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109302 >From cc2c798193722b3a537c76e74981ff767d064efa Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 19 Sep 2024 23:46:16 +0800 Subject: [PATCH 1/2] [clang-tidy][bugprone-posix-return] support integer lite

[clang] [codegen][NFC] add static mark for internal usage variable and function (PR #109431)

2024-09-20 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/109431 >From fdca1726b8fe9d60407e48426a513eebb81a710e Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Fri, 20 Sep 2024 22:27:28 +0800 Subject: [PATCH 1/2] [codegen][NFC] add static mark for internal usage variab

[clang] [lldb] [llvm] [llvm][TargetParser] Return StringMap from getHostCPUFeatures (PR #97824)

2024-09-20 Thread via cfe-commits
satmandu wrote: Worth noting that this affects mesa too: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11896 https://github.com/llvm/llvm-project/pull/97824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [AMDGPU] Change CF intrinsics lowering to reconverge on predecessors (PR #108596)

2024-09-20 Thread Jay Foad via cfe-commits
jayfoad wrote: > Although, revisiting this now, I still don't understand why they decided to > include ALL spill opcodes in the prologue, but not only the SGPR spills? > Clearly, none of the VGPR reloads really belong to the prologue. > > At a first glance, changing the isSpill(opcode) to isSG

[clang] [Clang] Prevent Copying of LateParsedClass Instances (PR #109428)

2024-09-20 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann approved this pull request. Looks good to me. Thanks @smanna12! https://github.com/llvm/llvm-project/pull/109428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] 78768c5 - [clang-move] Avoid repeated hash lookups (NFC) (#109374)

2024-09-20 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-09-20T07:57:49-07:00 New Revision: 78768c52a0e5d9915ee75a190b07114c174ff8cb URL: https://github.com/llvm/llvm-project/commit/78768c52a0e5d9915ee75a190b07114c174ff8cb DIFF: https://github.com/llvm/llvm-project/commit/78768c52a0e5d9915ee75a190b07114c174ff8cb.diff L

<    1   2   3   4   5   >