[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-16 Thread Akash Banerjee via cfe-commits
@@ -2096,15 +2102,1408 @@ OpenMPIRBuilder::createSection(const LocationDescription &Loc, /*IsCancellable*/ true); } -/// Create a function with a unique name and a "void (i8*, i8*)" signature in -/// the given module and return it. -Function *get

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-04-16 Thread Sam McCall via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #83124)

2024-04-16 Thread antoine moynault via cfe-commits
antmox wrote: hello, instantiate-new-placement-size.cpp also fails here : https://lab.llvm.org/buildbot/#/builders/188/builds/44501 https://github.com/llvm/llvm-project/pull/83124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [Coverage][NFC] Avoid visiting non-unique `OpaqueValueExpr` (PR #88910)

2024-04-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a created https://github.com/llvm/llvm-project/pull/88910 Only unique `OpaqueValueExpr`s should be handled in the mapping builder, as [discussed](https://github.com/llvm/llvm-project/pull/85837#discussion_r1542056451) in #85837. However, `getCond()` returns non-uni

[clang] [Coverage][NFC] Avoid visiting non-unique `OpaqueValueExpr` (PR #88910)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrey Ali Khan Bolshakov (bolshakov-a) Changes Only unique `OpaqueValueExpr`s should be handled in the mapping builder, as [discussed](https://github.com/llvm/llvm-project/pull/85837#discussion_r1542056451) in #85837. However, `getCond()

[clang] Improve stack usage to increase recursive initialization depth (PR #88546)

2024-04-16 Thread Matheus Izvekov via cfe-commits
@@ -1070,57 +1077,24 @@ class Sema; }; private: -SmallVector Candidates; -llvm::SmallPtrSet Functions; - -// Allocator for ConversionSequenceLists. We store the first few of these -// inline to avoid allocation for small sets. -llvm::BumpPtrAllocator

[clang-tools-extra] [clang-tidy NFC] Fix a typo in docs for sizeof-expression (PR #88912)

2024-04-16 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/88912 "Till heaven and earth pass, one jot, or one tittle shall not pass of the law" >From 79a551039394adef9a78e6fb7366d45c9bc65126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Don=C3=A1t=20Nagy?= Date: Tue, 16 Apr 2024

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-16 Thread via cfe-commits
@@ -826,6 +842,14 @@ void CXXRecordDecl::addedMember(Decl *D) { ? !Constructor->isImplicit() : (Constructor->isUserProvided() || Constructor->isExplicit())) data().Aggregate = false; + + // A trivially relocatable class is a class: +

[clang-tools-extra] [clang-tidy NFC] Fix a typo in docs for sizeof-expression (PR #88912)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy @llvm/pr-subscribers-clang-tools-extra Author: None (NagyDonat) Changes "Till heaven and earth pass, one jot, or one tittle shall not pass of the law" --- Full diff: https://github.com/llvm/llvm-project/pull/88912.diff 1 Files Affected: -

[clang] [clang][c++20] Fix code coverage mapping crash with generalized NTTPs (PR #85837)

2024-04-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -2177,7 +2177,8 @@ struct CounterCoverageMappingBuilder } void VisitOpaqueValueExpr(const OpaqueValueExpr* OVE) { -Visit(OVE->getSourceExpr()); +if (const Expr *SE = OVE->getSourceExpr()) bolshakov-a wrote: Makes sense, thanks! Moreover, I've r

[clang] [analyzer] Use explicit call description mode in iterator checkers (PR #88913)

2024-04-16 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/88913 This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in the iterator/container checkers. This change won't cau

[clang] [analyzer] Use explicit call description mode in iterator checkers (PR #88913)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: None (NagyDonat) Changes This commit explicitly specifies the matching mode (C library function, any non-method function, or C++ method) for the `CallDescription`s constructed in the iterator/c

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-16 Thread Akash Banerjee via cfe-commits
@@ -145,6 +145,8 @@ static bool isValidWorkshareLoopScheduleType(OMPScheduleType SchedType) { } #endif +Function *GLOBAL_ReductionFunc = nullptr; TIFitis wrote: We don't need this for now, I've removed it. https://github.com/llvm/llvm-project/pull/80343 ___

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-16 Thread Akash Banerjee via cfe-commits
@@ -607,15 +621,17 @@ class OpenMPIRBuilder { /// Generator for '#omp barrier' /// /// \param Loc The location where the barrier directive was encountered. - /// \param DK The kind of directive that caused the barrier. + /// \param Kind The kind of directive that caused

[clang] [llvm] [mlir] [OpenMP] Migrate GPU Reductions CodeGen from Clang to OMPIRBuilder (PR #80343)

2024-04-16 Thread Akash Banerjee via cfe-commits
@@ -99,14 +100,20 @@ class OpenMPIRBuilderConfig { /// expanded. std::optional IsGPU; - // Flag for specifying if offloading is mandatory. + /// Flag for specifying if LLVMUsed information should be emitted. + std::optional EmitLLVMUsed; TIFitis wrote:

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-16 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts created https://github.com/llvm/llvm-project/pull/88918 PR #80680 added bits in the codegen to lazily add convergence intrinsics when required. This logic relied on the LoopStack. The issue is when parsing the condition, the loopstack doesn't yet reflect the correct

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nathan Gauër (Keenuts) Changes PR #80680 added bits in the codegen to lazily add convergence intrinsics when required. This logic relied on the LoopStack. The issue is when parsing the condition, the loopstack doesn't yet reflect the corr

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > So, I was completely unaware that trivial relocatability had been picked up > at all by WG21. Since the beginning of `trivial_abi`, I we were solidly in > the vendor-extension space trying to build non-standard but practical > solutions to real world problems, like the fa

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-16 Thread Marcin Kowalczyk via cfe-commits
QrczakMK wrote: I think that if Clang chooses to support both variants of the type trait, it should provide both variants of `[[clang::trivial_abi]]`, so that a type like `std::unique_ptr` is trivially relocatable including assignment (and can be annotated as such), while a type like `std::tup

[clang] [llvm] Revert "[Sema] Mark alias/ifunc targets used and consider mangled names" (PR #88919)

2024-04-16 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph created https://github.com/llvm/llvm-project/pull/88919 Reverts llvm/llvm-project#87130 Bot is broken with clang crash: https://lab.llvm.org/buildbot/#/builders/272/builds/14063/steps/6/logs/stdio >From 271a8c2e5c8f57ab5d37f6056713dab530424470 Mon Sep 17 00:00:0

[clang] [llvm] Revert "[Sema] Mark alias/ifunc targets used and consider mangled names" (PR #88919)

2024-04-16 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph closed https://github.com/llvm/llvm-project/pull/88919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Revert "[Sema] Mark alias/ifunc targets used and consider mangled names" (PR #88919)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mehdi Amini (joker-eph) Changes Reverts llvm/llvm-project#87130 Bot is broken with clang crash: https://lab.llvm.org/buildbot/#/builders/272/builds/14063/steps/6/logs/stdio --- Full diff: https://github.com/llvm/llvm-project/pull/88919

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #88902)

2024-04-16 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/88902 >From 751fd34e843228ac69c317aa9ce4eba34df0d1e6 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 16 Apr 2024 07:25:34 -0700 Subject: [PATCH 1/2] [Clang][Sema] placement new initializes typedef array with c

[clang] Carving out -Wformat warning about scoped enums into a subwarning (PR #88595)

2024-04-16 Thread Aaron Ballman via cfe-commits
@@ -12,8 +12,8 @@ // RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -std=c11 -fsyntax-only -Wformat -verify=okay %s // Verify that -Wformat-signedness with -Wno-format are not reported (gcc compat). AaronBallman wrote: Agreed, that seems like an outstanding is

[libclc] 9d11128 - [libclc] Improve clarity of CMake foreach. NFC.

2024-04-16 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2024-04-16T16:50:14+01:00 New Revision: 9d111286322ec99b32467eef3aeec6b588c49f18 URL: https://github.com/llvm/llvm-project/commit/9d111286322ec99b32467eef3aeec6b588c49f18 DIFF: https://github.com/llvm/llvm-project/commit/9d111286322ec99b32467eef3aeec6b588c49f18.diff

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-16 Thread Matt Arsenault via cfe-commits
@@ -4987,7 +4990,11 @@ class CodeGenFunction : public CodeGenTypeCache { const llvm::Twine &Name = ""); // Adds a convergence_ctrl token to |Input| and emits the required parent // convergence instructions. - llvm::CallBase *addControll

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-16 Thread Matt Arsenault via cfe-commits
@@ -4824,6 +4824,9 @@ llvm::CallInst *CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee, llvm::CallInst *call = Builder.CreateCall( callee, args, getBundlesForFunclet(callee.getCallee()), name); call->setCallingConv(getRuntimeCC()); + + if (getTarget().ge

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-16 Thread Nathan Gauër via cfe-commits
@@ -4987,7 +4990,11 @@ class CodeGenFunction : public CodeGenTypeCache { const llvm::Twine &Name = ""); // Adds a convergence_ctrl token to |Input| and emits the required parent // convergence instructions. - llvm::CallBase *addControll

[libclc] [libclc] Allow building with pre-built tools (PR #88922)

2024-04-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/88922 Building the libclc project in-tree with debug tools can be very slow. This commit adds an option for a user to specify a dierctory from which to import (e.g., release-built) tools. All tools required by the p

[clang] [ClangOffloadBundler] Add file size to header (PR #88827)

2024-04-16 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > Isn't this ABI breaking since we're changing the size of the struct? > > Shouldn't that necessitate a new version? > > Also unrelated, I wonder if there's a future where we can use the > > ClangOffloadPackager format in the HIP runtime. > > I think you are right. Although th

[clang] [ClangOffloadBundler] Add file size to header (PR #88827)

2024-04-16 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Seems the documentation builder is complaining, maybe something wrong with the .rst file. https://github.com/llvm/llvm-project/pull/88827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-16 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: > We (users & implementers) have all collectively identified trivial > relocatability as an important optimization for vector-like containers, and > we're all looking for a solution to that. It feels like this attempt to > standardize this type trait is getting in the way of our

[clang] [ClangOffloadBundler] Add file size to header (PR #88827)

2024-04-16 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/88827 >From 7574258faa28a43549e507d08128ba700c42acc8 Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Mon, 15 Apr 2024 18:02:42 -0400 Subject: [PATCH] [ClangOffloadBundler] Add file size to header __hipRegister

[clang] [llvm] [PowerPC] Tune AIX shared library TLS model at function level by heuristic (PR #84132)

2024-04-16 Thread Hubert Tong via cfe-commits
@@ -5019,6 +5019,10 @@ def maix_small_local_exec_tls : Flag<["-"], "maix-small-local-exec-tls">, "where the offset from the TLS base is encoded as an " "immediate operand (AIX 64-bit only). " "This access sequence is not used for variables larg

[clang] [clang][ExtractAPI] Fix handling of anonymous TagDecls (PR #87772)

2024-04-16 Thread Daniel Grumberg via cfe-commits
@@ -54,6 +54,13 @@ RecordContext *APIRecord::castToRecordContext(const APIRecord *Record) { } } +void RecordContext::stealRecordChain(RecordContext &Other) { + First = Other.First; + Last = Other.Last; + Other.First = nullptr; + Other.Last = nullptr; +}

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-16 Thread Mehdi Amini via cfe-commits
joker-eph wrote: This broke a bot, I reverted and it's back green here: https://lab.llvm.org/buildbot/#/builders/272/builds/14069 https://github.com/llvm/llvm-project/pull/87130 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-16 Thread via cfe-commits
estewart08 wrote: Is it expected now that `clang --print-runtime-dir` will always have the clang host triple appended even if `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is off? https://github.com/llvm/llvm-project/pull/87866 ___ cfe-commits mailing list cfe

[clang] [clang][Sema] Track trivial-relocatability as a type trait (PR #84621)

2024-04-16 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > We (users & implementers) have all collectively identified trivial > > relocatability as an important optimization for vector-like containers, and > > we're all looking for a solution to that. It feels like this attempt to > > standardize this type trait is getting in t

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-16 Thread Alexandre Ganea via cfe-commits
@@ -174,3 +174,30 @@ TEST(DependencyScanningFilesystem, CacheStatOnExists) { EXPECT_EQ(InstrumentingFS->NumStatusCalls, 2u); EXPECT_EQ(InstrumentingFS->NumExistsCalls, 0u); } + +TEST(DependencyScanningFilesystem, CacheStatFailures) { + auto InMemoryFS = llvm::makeIntrusive

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-16 Thread Alexandre Ganea via cfe-commits
@@ -362,7 +357,7 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine &Path) { SmallString<256> OwnedFilename; StringRef Filename = Path.toStringRef(OwnedFilename); - if (Filename.ends_with(".pcm")) + if (shouldBypass(Filename)) aganea wro

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-16 Thread Alexandre Ganea via cfe-commits
@@ -201,11 +201,8 @@ const CachedRealPath &DependencyScanningFilesystemSharedCache::CacheShard:: return *StoredRealPath; } -static bool shouldCacheStatFailures(StringRef Filename) { - StringRef Ext = llvm::sys::path::extension(Filename); - if (Ext.empty()) -return fal

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-16 Thread Alexandre Ganea via cfe-commits
https://github.com/aganea edited https://github.com/llvm/llvm-project/pull/88800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SPIR-V] Always add convervence intrinsics (PR #88918)

2024-04-16 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/88918 From 94d76dcdfac88d1d50fe705406c0280c33766e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Mon, 15 Apr 2024 17:05:40 +0200 Subject: [PATCH 1/2] [clang][SPIR-V] Always add convervence intri

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-16 Thread Jan Svoboda via cfe-commits
@@ -201,11 +201,8 @@ const CachedRealPath &DependencyScanningFilesystemSharedCache::CacheShard:: return *StoredRealPath; } -static bool shouldCacheStatFailures(StringRef Filename) { - StringRef Ext = llvm::sys::path::extension(Filename); - if (Ext.empty()) -return fal

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-16 Thread Jan Svoboda via cfe-commits
@@ -362,7 +357,7 @@ DependencyScanningWorkerFilesystem::openFileForRead(const Twine &Path) { SmallString<256> OwnedFilename; StringRef Filename = Path.toStringRef(OwnedFilename); - if (Filename.ends_with(".pcm")) + if (shouldBypass(Filename)) jansvoboda

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-16 Thread Fangrui Song via cfe-commits
MaskRay wrote: > Is it expected now that `clang --print-runtime-dir` will always have the > clang host triple appended even if `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is > off? I guess I was expecting to see `lib/linux` instead of > `lib/x86_64-unknown-linux-gnu`. https://reviews.llvm.org/D98868

[clang] [flang] Avoid mentions of Clang in Flang's command line reference. (PR #88932)

2024-04-16 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/88932 The help text was not updated in #87360. Clang is also mentioned for the diagnostic warnings reference, which mostly applies to C/C++/Obj-C, not Fortran. #81726 already tried to fix this, and I don't know a

[clang] [analyzer] Use explicit call description mode in iterator checkers (PR #88913)

2024-04-16 Thread Balazs Benics via cfe-commits
https://github.com/steakhal approved this pull request. This should be all good. FYI std lib funcs are not always functions. They could be also niebloids, which we cant actually hook. This shouldnt affect these apis though. I left it here as food for thought. https://github.com/llvm/llvm-proj

[clang] 22e6bf7 - [unused-includes][Serialization] Remove unused includes. NFC. (#88790)

2024-04-16 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2024-04-16T10:12:26-07:00 New Revision: 22e6bf77ad8781810fc81fff4c447c03cdf6f419 URL: https://github.com/llvm/llvm-project/commit/22e6bf77ad8781810fc81fff4c447c03cdf6f419 DIFF: https://github.com/llvm/llvm-project/commit/22e6bf77ad8781810fc81fff4c447c03cdf6f419.di

[clang] [unused-includes][Serialization] Remove unused includes. NFC. (PR #88790)

2024-04-16 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/88790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b566810 - [unused-includes] PCHContainerOperations uses MemoryBufferRef, not MemoryBuffer. NFC. (#88794)

2024-04-16 Thread via cfe-commits
Author: Volodymyr Sapsai Date: 2024-04-16T10:13:15-07:00 New Revision: b566810add5b7c5695bdd2c39710b78af9dc83ba URL: https://github.com/llvm/llvm-project/commit/b566810add5b7c5695bdd2c39710b78af9dc83ba DIFF: https://github.com/llvm/llvm-project/commit/b566810add5b7c5695bdd2c39710b78af9dc83ba.di

[clang] [unused-includes] PCHContainerOperations uses MemoryBufferRef, not MemoryBuffer. NFC. (PR #88794)

2024-04-16 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai closed https://github.com/llvm/llvm-project/pull/88794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -2216,7 +2216,7 @@ static llvm::Value *EmitTypeidFromVTable(CodeGenFunction &CGF, const Expr *E, } llvm::Value *CodeGenFunction::EmitCXXTypeidExpr(const CXXTypeidExpr *E) { - llvm::Type *PtrTy = llvm::PointerType::getUnqual(getLLVMContext()); + llvm::Type *PtrTy = Int8Pt

[clang] [ARM64EC] Add support for parsing __vectorcall (PR #87725)

2024-04-16 Thread Casey Carter via cfe-commits
CaseyCarter wrote: > @CaseyCarter It feels like we are missing an arm64ec check here, > https://github.com/microsoft/STL/blob/be81252ed1f5e5fc6d77faca0b5dbbbdae8143a2/stl/inc/type_traits#L398 > unless this was intentional and just not documented? I have absolutely no idea what's going on here

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 updated https://github.com/llvm/llvm-project/pull/84384 >From ef23d427b48687b62da9e1062886ddfcc1649b6a Mon Sep 17 00:00:00 2001 From: John McCall Date: Mon, 16 Dec 2019 20:31:25 -0500 Subject: [PATCH 1/7] Abstract serialization fixes for the Apple Clang changes. ---

[libclc] [WIP] Libclc tests (PR #87989)

2024-04-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/87989 >From 9048dbc6547fa14c78649d02f27d68fc27ca7e70 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 4 Apr 2024 17:49:13 +0100 Subject: [PATCH] [libclc] Add initial LIT tests These tests aren't very meani

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/87989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add initial LIT tests (PR #87989)

2024-04-16 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/87989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson requested changes to this pull request. The code change itself looks good to me and will be helpful for e.g. the CHERI fork. However, I don't think copy-pasting tests is a good strategy it would be much cleaner to just add a new RUN line to the existing tests. h

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -I%S %s -triple spirv64-unknown-unknown -fsycl-is-device -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s +struct A { virtual void f(); }; +struct B : A { }; + +// CHECK: {{define.*@_Z1fP1A}} +// CHECK-SAME: personality ptr @__gxx

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -triple spirv64-unknown-unknown -fsycl-is-device -std=c++20 %s -emit-llvm -o - | FileCheck %s + +struct S { char buf[32]; }; arichardson wrote: Same here, and I can see that the two copies are out-of sync. Would be good to m

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -0,0 +1,24 @@ +// RUN: %clang_cc1 -I%S %s -triple spirv64-unknown-unknown -fsycl-is-device -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s arichardson wrote: Could you use update_cc_test_checks --check-globals here to just check the whole functi

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
@@ -366,7 +366,8 @@ CodeGenModule::CodeGenModule(ASTContext &C, IntTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getIntWidth()); IntPtrTy = llvm::IntegerType::get(LLVMContext, C.getTargetInfo().getMaxPointerWidth()); - Int8PtrTy = llvm::PointerType::get(LL

[clang] [Clang][CodeGen] Start migrating away from assuming the Default AS is 0 (PR #88182)

2024-04-16 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson edited https://github.com/llvm/llvm-project/pull/88182 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/88611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][builtin] Implement __builtin_allow_runtime_check (PR #87568)

2024-04-16 Thread Aaron Ballman via cfe-commits
@@ -3464,6 +3464,34 @@ Query for this feature with ``__has_builtin(__builtin_trap)``. ``__builtin_arm_trap`` is lowered to the ``llvm.aarch64.break`` builtin, and then to ``brk #payload``. +``__builtin_allow_runtime_check`` AaronBallman wrote: Okay, let's

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Daniil Kovalev via cfe-commits
@@ -607,13 +799,17 @@ class Qualifiers { void Profile(llvm::FoldingSetNodeID &ID) const { ID.AddInteger(Mask); +PtrAuth.Profile(ID); } private: // bits: |0 1 2|3|4 .. 5|6 .. 8|9 ... 31| // |C R V|U|GCAttr|Lifetime|AddressSpace| uint

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Daniil Kovalev via cfe-commits
@@ -194,19 +358,27 @@ class Qualifiers { FastMask = (1 << FastWidth) - 1 }; + Qualifiers() : Mask(0), PtrAuth() {} + kovdan01 wrote: Fixed, thanks, see cfb3afe19c698aaf41fb7b492503081989896434 https://github.com/llvm/llvm-project/pull/84384 _

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Daniil Kovalev via cfe-commits
@@ -139,6 +141,168 @@ using CanQualType = CanQual; #define TYPE(Class, Base) class Class##Type; #include "clang/AST/TypeNodes.inc" +/// Pointer-authentication qualifiers. +class PointerAuthQualifier { + enum : uint32_t { +EnabledShift = 0, +EnabledBits = 1, +Enabl

[clang] [clang][SPIR-V] Set AS for the SPIR-V logical triple (PR #88939)

2024-04-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes This was missed in #88455, causing most of the .hlsl to SPIR-V tests to fail (such as clang\test\Driver\hlsl-lang-targets-spirv.hlsl) --- Full diff: https://github.com/llvm/llvm-project/pull/88939.diff 1 F

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Daniil Kovalev via cfe-commits
@@ -139,6 +141,168 @@ using CanQualType = CanQual; #define TYPE(Class, Base) class Class##Type; #include "clang/AST/TypeNodes.inc" +/// Pointer-authentication qualifiers. +class PointerAuthQualifier { + enum : uint32_t { +EnabledShift = 0, +EnabledBits = 1, +Enabl

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Daniil Kovalev via cfe-commits
@@ -2196,6 +2196,16 @@ class ASTContext : public RefCountedBase { return getQualifiedType(type.getUnqualifiedType(), Qs); } + /// \brief Return a type with the given __ptrauth qualifier. + QualType getPointerAuthType(QualType Ty, PointerAuthQualifier PointerAuth) { +

[clang] [PAC][clang] Define `PointerAuthQualifier` and `PointerAuthenticationMode` (PR #84384)

2024-04-16 Thread Daniil Kovalev via cfe-commits
@@ -251,15 +423,16 @@ class Qualifiers { } // Deserialize qualifiers from an opaque representation. - static Qualifiers fromOpaqueValue(unsigned opaque) { + static Qualifiers fromOpaqueValue(uint64_t Opaque) { Qualifiers Qs; -Qs.Mask = opaque; +Qs.Mask = uin

[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

2024-04-16 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > > Is it expected now that `clang --print-runtime-dir` will always have the > > clang host triple appended even if `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is > > off? I guess I was expecting to see `lib/linux` instead of > > `lib/x86_64-unknown-linux-gnu`. > > https://reviews.ll

[clang] [llvm] [clang][CodeGen] Add AS for Globals to SPIR & SPIRV datalayouts (PR #88455)

2024-04-16 Thread Justin Bogner via cfe-commits
bogner wrote: Looks like this missed a spot, causing the .hlsl to spir-v tests to fail. I've put up a fix in #88939 https://github.com/llvm/llvm-project/pull/88455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Clang][Sema] placement new initializes typedef array with correct size (PR #88902)

2024-04-16 Thread via cfe-commits
https://github.com/mahtohappy updated https://github.com/llvm/llvm-project/pull/88902 >From 751fd34e843228ac69c317aa9ce4eba34df0d1e6 Mon Sep 17 00:00:00 2001 From: mahtohappy Date: Tue, 16 Apr 2024 07:25:34 -0700 Subject: [PATCH 1/3] [Clang][Sema] placement new initializes typedef array with c

[clang] 7505452 - [clang][Interp] Implement VectorSplat casts

2024-04-16 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-04-16T19:31:16+02:00 New Revision: 75054525ae58f26c86e418382164540760871186 URL: https://github.com/llvm/llvm-project/commit/75054525ae58f26c86e418382164540760871186 DIFF: https://github.com/llvm/llvm-project/commit/75054525ae58f26c86e418382164540760871186.diff LO

[clang] Improve stack usage to increase recursive initialization depth (PR #88546)

2024-04-16 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/88546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4082a75 - Improve stack usage to increase recursive initialization depth (#88546)

2024-04-16 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-04-16T13:48:13-04:00 New Revision: 4082a7554521572a65a5a0008c4661a534df659d URL: https://github.com/llvm/llvm-project/commit/4082a7554521572a65a5a0008c4661a534df659d DIFF: https://github.com/llvm/llvm-project/commit/4082a7554521572a65a5a0008c4661a534df659d.diff

[clang] Improve stack usage to increase recursive initialization depth (PR #88546)

2024-04-16 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/88546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aefff77 - [clang] Migrate DR tests to `static_assert` (#88611)

2024-04-16 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-04-16T21:50:22+04:00 New Revision: aefff774a0d6f75565243263555f2513ac3c9fdf URL: https://github.com/llvm/llvm-project/commit/aefff774a0d6f75565243263555f2513ac3c9fdf DIFF: https://github.com/llvm/llvm-project/commit/aefff774a0d6f75565243263555f2513ac3c9fdf.

[clang] [clang] Migrate DR tests to `static_assert` (PR #88611)

2024-04-16 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/88611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86][test] Added extra cet tests (PR #88736)

2024-04-16 Thread Isha Agarwal via cfe-commits
https://github.com/iagarwa updated https://github.com/llvm/llvm-project/pull/88736 >From 821c61fb4905b491176e00ea9ed322aad04c98e3 Mon Sep 17 00:00:00 2001 From: Isha Agarwal Date: Mon, 15 Apr 2024 06:22:34 -0700 Subject: [PATCH 1/2] [X86][test] Added extra cet tests Updated cet test to: -Check

[clang] [clang] Fix high memory consumption during pack deduction (PR #88637)

2024-04-16 Thread Erich Keane via cfe-commits
@@ -831,7 +831,7 @@ class PackDeductionScope { if (IsPartiallyExpanded) PackElements += NumPartialPackArgs; else if (IsExpanded) - PackElements += *FixedNumExpansions; + PackElements += FixedNumExpansions.value_or(1); erichkeane wrote:

[clang] [BitInt] Expose a _BitInt literal suffix in C++ (PR #86586)

2024-04-16 Thread via cfe-commits
https://github.com/js324 updated https://github.com/llvm/llvm-project/pull/86586 >From 1b0902aa9f8a07771f29fb21d7b4cdea9e966118 Mon Sep 17 00:00:00 2001 From: Jin S Date: Mon, 25 Mar 2024 17:19:41 -0400 Subject: [PATCH 1/2] [BitInt] Expose a _BitInt literal suffix in C++ --- clang/docs/Release

[clang] [Sema] Mark alias/ifunc targets used and consider mangled names (PR #87130)

2024-04-16 Thread Fangrui Song via cfe-commits
MaskRay wrote: > This broke a bot, I reverted and it's back green here: > [lab.llvm.org/buildbot/#/builders/272/builds/14069](https://lab.llvm.org/buildbot/#/builders/272/builds/14069) Thanks. llvm-project/libc has a pattern like the following. ``` namespace libc { double log2(double x); } ext

[clang] [clang][SPIR-V] Set AS for the SPIR-V logical triple (PR #88939)

2024-04-16 Thread Alex Voicu via cfe-commits
AlexVlx wrote: a) Thanks!; b) apologies for the noise; c) this was actually done on purpose, I actively eschewed changing Logical SPIRV because it wasn't actually clear to me if in the long run it'd have the same AS map / would use numerical 1 for globals. If Logical SPIRV is going to go with

[clang] [clang][SPIR-V] Set AS for the SPIR-V logical triple (PR #88939)

2024-04-16 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx approved this pull request. LGTM, please have a peek at the comment if possible. https://github.com/llvm/llvm-project/pull/88939 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [analyzer] Harden security.cert.env.InvalidPtr checker fn matching (PR #88536)

2024-04-16 Thread Ilya A. Kriveshko via cfe-commits
@@ -205,8 +210,12 @@ void InvalidPtrChecker::postPreviousReturnInvalidatingCall( CE, LCtx, CE->getType(), C.blockCount()); State = State->BindExpr(CE, LCtx, RetVal); + const auto *SymRegOfRetVal = + dyn_cast_or_null(RetVal.getAsRegion()); + if (!SymRegOfRetVal)

[clang] [analyzer] Harden security.cert.env.InvalidPtr checker fn matching (PR #88536)

2024-04-16 Thread Ilya A. Kriveshko via cfe-commits
@@ -205,8 +210,12 @@ void InvalidPtrChecker::postPreviousReturnInvalidatingCall( CE, LCtx, CE->getType(), C.blockCount()); State = State->BindExpr(CE, LCtx, RetVal); + const auto *SymRegOfRetVal = + dyn_cast_or_null(RetVal.getAsRegion()); + if (!SymRegOfRetVal)

[clang] Do not warn about unused plugin flags. (PR #88948)

2024-04-16 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur created https://github.com/llvm/llvm-project/pull/88948 Plugins are not loaded without the -cc1 phase. Do not report them when running on an assembly file or when linking. Many build tools add these options to all driver invocations, including LLVM's build system.

[clang] [driver] Do not warn about unused plugin flags. (PR #88948)

2024-04-16 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/88948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Only bypass scanning VFS for the module cache (PR #88800)

2024-04-16 Thread Jan Svoboda via cfe-commits
@@ -201,11 +201,8 @@ const CachedRealPath &DependencyScanningFilesystemSharedCache::CacheShard:: return *StoredRealPath; } -static bool shouldCacheStatFailures(StringRef Filename) { - StringRef Ext = llvm::sys::path::extension(Filename); - if (Ext.empty()) -return fal

[clang] [flang] [flang][driver] Avoid mentions of Clang in Flang's command line reference. (PR #88932)

2024-04-16 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/88932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1c2afba - [CodeGen, test] Test llvm-libc style alias attribute with UsingShadowDecl

2024-04-16 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-04-16T11:05:45-07:00 New Revision: 1c2afbae9af22b58190c10e3517242d01d89d612 URL: https://github.com/llvm/llvm-project/commit/1c2afbae9af22b58190c10e3517242d01d89d612 DIFF: https://github.com/llvm/llvm-project/commit/1c2afbae9af22b58190c10e3517242d01d89d612.diff

[clang] [llvm] Revert "[Sema] Mark alias/ifunc targets used and consider mangled names" (PR #88919)

2024-04-16 Thread Fangrui Song via cfe-commits
MaskRay wrote: Thanks. 1c2afbae9af22b58190c10e3517242d01d89d612 is a codegen test of this involved llvm-libc pattern which would also catch the bug. https://github.com/llvm/llvm-project/pull/88919 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[libclc] [libclc] Allow building with pre-built tools (PR #88922)

2024-04-16 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/88922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9ec8c96 - [clang][dataflow] Expose getReferencedDecls and relocate free functions. (#88754)

2024-04-16 Thread via cfe-commits
Author: Samira Bazuzi Date: 2024-04-16T14:46:05-04:00 New Revision: 9ec8c961664de3b3fcc1cbd5238e40ec8c9bdddb URL: https://github.com/llvm/llvm-project/commit/9ec8c961664de3b3fcc1cbd5238e40ec8c9bdddb DIFF: https://github.com/llvm/llvm-project/commit/9ec8c961664de3b3fcc1cbd5238e40ec8c9bdddb.diff

[clang] [clang][dataflow] Expose getReferencedDecls and relocate free functions. (PR #88754)

2024-04-16 Thread Yitzhak Mandelbaum via cfe-commits
https://github.com/ymand closed https://github.com/llvm/llvm-project/pull/88754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >