[clang] [llvm] [DirectX] Calculate resource binding offsets using the lower bound (PR #117303)

2024-11-22 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/117303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

2024-11-22 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/114847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a5f501e - [HLSL][DXIL] Implement `asdouble` intrinsic (#114847)

2024-11-22 Thread via cfe-commits
Author: Finn Plummer Date: 2024-11-22T10:23:30-08:00 New Revision: a5f501e347f66d66818fba5aa7dbc25a07299ca5 URL: https://github.com/llvm/llvm-project/commit/a5f501e347f66d66818fba5aa7dbc25a07299ca5 DIFF: https://github.com/llvm/llvm-project/commit/a5f501e347f66d66818fba5aa7dbc25a07299ca5.diff

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-22 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B closed https://github.com/llvm/llvm-project/pull/117074 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] doc: Clarify that ffile-prefix-map applies to fcoverage-prefix-map, too [NFC] (PR #117135)

2024-11-22 Thread Keith Smiley via cfe-commits
keith wrote: thanks! https://github.com/llvm/llvm-project/pull/117135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Support __builtin_cpu_is (PR #116231)

2024-11-22 Thread Florian Mayer via cfe-commits
fmayer wrote: Fails buildbot: https://lab.llvm.org/buildbot/#/builders/24/builds/2791/steps/10/logs/stdio ``` -- Testing: 83950 of 83951 tests, 48 workers -- Testing: 0.. 10.. FAIL: Clang :: Preprocessor/has_builtin_cpuid.c (15996 of 83950) TEST 'Clang :: Preprocessor/has_

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes The standard mandates that this returns the width of the type, which is the number of bits in the value. For bool, that's required to be `1` explicitly. --- Full diff: https://github.com/llvm/llvm-proj

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/117364 The standard mandates that this returns the width of the type, which is the number of bits in the value. For bool, that's required to be `1` explicitly. >From 37923ec9c6a0bbabd2640f7e95549bf560974e59 Mon S

[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-11-22 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > for this to make it easier to roll out? Note that recently Clang introduced a mechanism for file-level suppression of warnings, for easier rollout of warnings: https://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-suppression-mappings Would that serve

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread Jessica Clarke via cfe-commits
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI, assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far"); Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth())); - Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread Jessica Clarke via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -verify -std=c23 -ffreestanding %s + +/* WG14 N2412: Clang 14 + * Two's complement sign representation + */ +// expected-no-diagnostics + +#include + +// GH117348 -- BOOL_WIDTH was accidentally expanding to the number of bits in +// the object

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread Jessica Clarke via cfe-commits
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI, assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far"); Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth())); - Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool

[clang] [Clang] Enable -fpointer-tbaa by default. (PR #117244)

2024-11-22 Thread Florian Hahn via cfe-commits
fhahn wrote: > What are the chances that this will exploit undefined behavior in existing > user code in ways that will make upgrading to the latest Clang more difficult > because of the perception of "miscompiles?" If this is a likely scenario for > users to hit, do other tools like UBSan (et

[clang] [HLSL] Add ByteAddressBuffer definition to HLSLExternalSemaSource #113477 (PR #116699)

2024-11-22 Thread Joshua Batista via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump -DEMPTY %s | FileCheck -check-prefix=EMPTY %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump %s | FileCheck %s + + +// EMPTY: CXXRecordDecl 0x{{[0-9A-Fa-f]

[clang] [Clang] Enable -fpointer-tbaa by default. (PR #117244)

2024-11-22 Thread Florian Hahn via cfe-commits
fhahn wrote: I'd also like to share a bit more info about the expected compile-time impact of the change: * stage1-O3 0.01%, * stage1-ReleaseThinLTO +0.04%, * stage1-ReleaseLTO-g +0.07% , * stage2-O3 -0.07% * clang build time +0.13% Full data: https://llvm-compile-time-tracker.com/compare.p

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/117364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/117364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Fixed the value of BOOL_WIDTH (PR #117364)

2024-11-22 Thread Richard Smith via cfe-commits
@@ -1103,7 +1103,15 @@ static void InitializePredefinedMacros(const TargetInfo &TI, assert(TI.getCharWidth() == 8 && "Only support 8-bit char so far"); Builder.defineMacro("__CHAR_BIT__", Twine(TI.getCharWidth())); - Builder.defineMacro("__BOOL_WIDTH__", Twine(TI.getBool

[clang] [llvm] Codegen changes for strict modifier with grainsize/num_tasks of taskloop construct (PR #117196)

2024-11-22 Thread Shilei Tian via cfe-commits
@@ -7831,10 +7831,14 @@ void CodeGenFunction::EmitOMPTaskLoopBasedDirective(const OMPLoopDirective &S) { // grainsize clause Data.Schedule.setInt(/*IntVal=*/false); Data.Schedule.setPointer(EmitScalarExpr(Clause->getGrainsize())); +Data.HasModifier = +(

[clang] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-11-22 Thread Helena Kotas via cfe-commits
@@ -12487,6 +12487,7 @@ def err_hlsl_pointers_unsupported : Error< "%select{pointers|references}0 are unsupported in HLSL">; def err_hlsl_missing_resource_class : Error<"HLSL resource needs to have [[hlsl::resource_class()]] attribute">; def err_hlsl_attribute_needs_intangib

[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)

2024-11-22 Thread via cfe-commits
serge-sans-paille wrote: `-Wnontrivial-memcall` to match `-Wnontricial-memaccess` ? https://github.com/llvm/llvm-project/pull/111434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-11-22 Thread Helena Kotas via cfe-commits
@@ -2,36 +2,36 @@ // RUN: %clang_cc1 -triple spirv-pc-vulkan-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s -check-prefixes=SPIRV // NOTE: The type name number and whether the struct is packed or not will mostly -// likely change once s

[clang] [HLSL] Implement RWBuffer::operator[] via __builtin_hlsl_resource_getpointer (PR #117017)

2024-11-22 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/117017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_permlane16_swap_b32 and v_permlane32_swap_b32 for gfx950 (PR #117260)

2024-11-22 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/117260 >From d008e0375c6c16e00ff091d0e2eaeb007ccbce77 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Mon, 22 Jan 2024 12:40:54 +0700 Subject: [PATCH] AMDGPU: Add v_permlane16_swap_b32 and v_permlane32_swap_b32 for

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-22 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/114148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-22 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Just a few nitpicks - this looks great, thanks! https://github.com/llvm/llvm-project/pull/114148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-22 Thread Justin Bogner via cfe-commits
@@ -19371,6 +19371,15 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0}, nullptr, "hlsl.radians"); } + case Builtin::BI__builtin_hlsl_buffer_update_counter: { +Value *ResHandle = EmitScalarExp

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-22 Thread Justin Bogner via cfe-commits
@@ -570,3 +780,20 @@ void HLSLExternalSemaSource::CompleteType(TagDecl *Tag) { return; It->second(Record); } + +static FunctionDecl *lookupBuiltinFunction(Sema &S, StringRef Name) { + IdentifierInfo &II = + S.getASTContext().Idents.get(Name, tok::TokenKind::identifi

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-22 Thread Justin Bogner via cfe-commits
@@ -343,27 +343,232 @@ struct TemplateParameterListBuilder { Params.clear(); QualType T = Builder.Template->getInjectedClassNameSpecialization(); -T = S.Context.getInjectedClassNameType(Builder.Record, T); +T = AST.getInjectedClassNameType(Builder.Record, T);

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-22 Thread Justin Bogner via cfe-commits
@@ -37,7 +37,7 @@ def int_dx_typedBufferStore : DefaultAttrsIntrinsic<[], [llvm_any_ty, llvm_i32_ty, llvm_anyvector_ty], [IntrWriteMem]>; -def int_dx_updateCounter +def int_dx_bufferUpdateCounter bogner wrote: We'll need to rev

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-11-22 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun created https://github.com/llvm/llvm-project/pull/117344 In modern C++ we often use span, string_view or other view objects instead of raw pointers. This PR opens the door to mark those noescape. This can be useful to document the API contracts, for interop with me

[clang] Added more descriptive message (issue 116808) (PR #117201)

2024-11-22 Thread via cfe-commits
https://github.com/tlemy updated https://github.com/llvm/llvm-project/pull/117201 >From 99f9b957a5b82c532e97b08b9a45ddf2a2918b68 Mon Sep 17 00:00:00 2001 From: ted Date: Thu, 21 Nov 2024 13:04:05 -0500 Subject: [PATCH 1/2] Added more descriptive message (issue 116808) --- clang/include/clang/

[clang] [Clang] Permit noescape on non-pointer types (PR #117344)

2024-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Gábor Horváth (Xazax-hun) Changes In modern C++ we often use span, string_view or other view objects instead of raw pointers. This PR opens the door to mark those noescape. This can be useful to document the API contracts, for interop wit

[clang] [Clang] use begin member expr location for call expr with deducing this (PR #117345)

2024-11-22 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk created https://github.com/llvm/llvm-project/pull/117345 Fixes #116928 >From c3480ca4f4f5b14185880c055613648ceb9f15be Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 22 Nov 2024 18:29:52 +0200 Subject: [PATCH] [Clang] use begin member expression location for

[clang] [clang][codegen] Mention the invariant that LLVM demangler should be … (PR #117346)

2024-11-22 Thread Viktoriia Bakalova via cfe-commits
https://github.com/VitaNuo created https://github.com/llvm/llvm-project/pull/117346 …able to handle mangled names generated by clang. https://discourse.llvm.org/t/rfc-clang-diagnostic-for-demangling-failures/82835/8 Since we're putting the work on the above RFC on hold, let's leave a comment i

[clang] [Clang] use begin member expr location for call expr with deducing this (PR #117345)

2024-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Oleksandr T. (a-tarasyuk) Changes Fixes #116928 --- Full diff: https://github.com/llvm/llvm-project/pull/117345.diff 2 Files Affected: - (modified) clang/lib/Sema/SemaOverload.cpp (+1-1) - (added) clang/test/AST/ast-dump-cxx2b-deducing

[clang] [libcxx] [Clang] Add __builtin_invoke and detect std::invoke as a builtin (PR #116709)

2024-11-22 Thread Louis Dionne via cfe-commits
ldionne wrote: > > 1. I'm not convinced the library part is true. The reality is that we support > Clang and GCC, and if they both support the builtins (or provide different > ones for the same feature) we remove our fallback implementations and thus > reducing the complexity for libc++. GCC

[clang] [clang][codegen] Mention the invariant that LLVM demangler should be … (PR #117346)

2024-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Viktoriia Bakalova (VitaNuo) Changes …able to handle mangled names generated by clang. https://discourse.llvm.org/t/rfc-clang-diagnostic-for-demangling-failures/82835/8 Since we're putting the work on the above RFC on hold, let's leave a

[clang] [clang][codegen] Mention the invariant that LLVM demangler should be … (PR #117346)

2024-11-22 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 026af9e972469c878e51f1215659b7264da0136d abd3c27d94b7f18990377d518aa8e14b32659b5f --e

[clang] [clang][bytecode][NFC] Avoid a getSource() call (PR #117311)

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

[clang] a9731df - [clang][bytecode][NFC] Avoid a getSource() call (#117311)

2024-11-22 Thread via cfe-commits
Author: Timm Baeder Date: 2024-11-22T14:00:10+01:00 New Revision: a9731dff0a0133f718e8e4fb6c729aa1d7c909a4 URL: https://github.com/llvm/llvm-project/commit/a9731dff0a0133f718e8e4fb6c729aa1d7c909a4 DIFF: https://github.com/llvm/llvm-project/commit/a9731dff0a0133f718e8e4fb6c729aa1d7c909a4.diff L

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-11-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes LGTM as far as they go, but can you add details to the patch summary about why these should be exposed? (We typically only add to the AST matchers when there's an in-tree need for the functionality, so are there checks being updated to mak

[clang] [Driver] Support fprofile-sample-use= for CL (PR #117282)

2024-11-22 Thread Tim Creech via cfe-commits
https://github.com/tcreech-intel approved this pull request. Looks good to me. https://github.com/llvm/llvm-project/pull/117282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Infer lifetime_capture_by for STL containers (PR #117122)

2024-11-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-runtime` running on `omp-vega20-0` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/30/builds/10839 Here is the relevant piece of

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-22 Thread Aaron Ballman via cfe-commits
@@ -1472,3 +1472,144 @@ template struct Outer { }; }; Outer::Inner outerinner; + +struct Polymorphic { virtual ~Polymorphic() { } }; + +template +struct Inherit : Bases... { // #TYPE_INHERIT + int g1; // #FIELD_G1 +}; + +template +struct InheritWithExplicit : Bases... { // #

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: > Huh, that's strange. Any idea why the warning isn't being emitted? Yeah, that is really kind of weird; the logic looks correct to me. You'll probably have to look at it under the debugger to see what's going on. :-( https://github.com/llvm/llvm-proj

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-22 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/102040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-11-22 Thread Aaron Ballman via cfe-commits
@@ -1472,3 +1472,144 @@ template struct Outer { }; }; Outer::Inner outerinner; + +struct Polymorphic { virtual ~Polymorphic() { } }; + +template +struct Inherit : Bases... { // #TYPE_INHERIT + int g1; // #FIELD_G1 +}; + +template +struct InheritWithExplicit : Bases... { // #

[clang] [HLSL] Get the index for resource bindings from the slot (PR #117303)

2024-11-22 Thread Chris B via cfe-commits
@@ -588,7 +588,7 @@ llvm::Function *CGHLSLRuntime::createResourceBindingInitFn() { auto *Slot = llvm::ConstantInt::get(CGM.IntTy, RBA->getSlotNumber()); // FIXME: resource arrays are not yet implemented auto *Range = llvm::ConstantInt::get(CGM.IntTy, 1); -

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-aarch64-quick` running on `linaro-clang-aarch64-quick` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/65/builds/8233 Here is the relevant piec

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-gcc-ubuntu` running on `sie-linux-worker3` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/174/builds/8917 Here

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/133/builds/7283 Here is the relevant pie

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-22 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 01/10] `sret` args should always point to the `alloca` AS, so we ca

[clang] [ObjC] Enable diagnose_if on Objective-C methods (PR #115056)

2024-11-22 Thread via cfe-commits
apple-fcloutier wrote: This is a design space that is large for a person who does not know Clang's internals and history very well, but that seems fairly narrow for someone with a lot of experience. As a matter of fact, [there is a CallableDecl](https://github.com/llvm/llvm-project/pull/115056

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

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

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-22 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx commented: Gentle ping. https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Disallow named struct types as parameters in target extension types (PR #115971)

2024-11-22 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/115971 >From 7413ceb21a6e0ac9212ef6317763ee0eff559612 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Tue, 12 Nov 2024 16:44:00 -0800 Subject: [PATCH 1/7] print struct body within target ext ty context --- .../t

[clang] [llvm] Reland - [Driver][SYCL] Add initial SYCL offload compilation support … (PR #117268)

2024-11-22 Thread Michael Toguchi via cfe-commits
@@ -0,0 +1,179 @@ +//===--- SYCL.cpp - SYCL Tool and ToolChain Implementations -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `clang` at step 6 "Add check check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/11532 Here is

[clang] [HIP] Fix tests broken by #117074 / 689c532 (PR #117361)

2024-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Artem Belevich (Artem-B) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/117361.diff 4 Files Affected: - (modified) clang/test/Driver/hip-rdc-device-only.hip (+4-4) - (modified) clang/test/Driver/hip-toolchain-

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-11-22 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud edited https://github.com/llvm/llvm-project/pull/117021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Fix tests broken by #117074 / 689c532 (PR #117361)

2024-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Belevich (Artem-B) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/117361.diff 4 Files Affected: - (modified) clang/test/Driver/hip-rdc-device-only.hip (+4-4) - (modified) clang/test/Driver/hip-toolchain-no-rdc.

[clang] [HIP] Fix tests broken by #117074 / 689c532 (PR #117361)

2024-11-22 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/117361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTMatchers] AST matcher support for ObjC pointers (PR #117021)

2024-11-22 Thread Rashmi Mudduluru via cfe-commits
t-rasmud wrote: > The changes LGTM as far as they go, but can you add details to the patch > summary about why these should be exposed? (We typically only add to the AST > matchers when there's an in-tree need for the functionality, so are there > checks being updated to make use of these new

[clang] 71f14ff - [HIP] Fix tests broken by #117074 / 689c532 (#117361)

2024-11-22 Thread via cfe-commits
Author: Artem Belevich Date: 2024-11-22T10:55:27-08:00 New Revision: 71f14ffba6ec8a6606911279781576e521c2b7dd URL: https://github.com/llvm/llvm-project/commit/71f14ffba6ec8a6606911279781576e521c2b7dd DIFF: https://github.com/llvm/llvm-project/commit/71f14ffba6ec8a6606911279781576e521c2b7dd.diff

[clang] [HIP] Fix tests broken by #117074 / 689c532 (PR #117361)

2024-11-22 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B closed https://github.com/llvm/llvm-project/pull/117361 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libcxx] Support for using timespec_get (PR #117362)

2024-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Petr Hosek (petrhosek) Changes clock_gettime is a POSIX API that may not be available on platforms like baremetal; timespec_get is the C11 equivalent. This change adds support for using timespec_get instead of clock_gettime to improve com

[clang] [libcxx] [libcxx] Support for using timespec_get (PR #117362)

2024-11-22 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek created https://github.com/llvm/llvm-project/pull/117362 clock_gettime is a POSIX API that may not be available on platforms like baremetal; timespec_get is the C11 equivalent. This change adds support for using timespec_get instead of clock_gettime to improve comp

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-22 Thread Nicolas van Kempen via cfe-commits
@@ -183,40 +210,47 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang] 23d7a6c - [flang][Driver] Support -print-supported-cpus and associated aliases (#117199)

2024-11-22 Thread via cfe-commits
Author: Tarun Prabhu Date: 2024-11-22T11:57:03-07:00 New Revision: 23d7a6cedb5198535086a67586487f19effbd411 URL: https://github.com/llvm/llvm-project/commit/23d7a6cedb5198535086a67586487f19effbd411 DIFF: https://github.com/llvm/llvm-project/commit/23d7a6cedb5198535086a67586487f19effbd411.diff

[clang] [flang] [flang][Driver] Support -print-supported-cpus and associated aliases (PR #117199)

2024-11-22 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu closed https://github.com/llvm/llvm-project/pull/117199 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-22 Thread Nicolas van Kempen via cfe-commits
@@ -183,40 +210,45 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] New option `CompilationArgsToRemoveRegex` to remove arguments from the command line (PR #111453)

2024-11-22 Thread Carlos Galvez via cfe-commits
=?utf-8?q?Félix-Antoine?= Constantin Message-ID: In-Reply-To: carlosgalvezp wrote: The way we do it at our place is that we have 2 toolchains, one for GCC and one for Clang, each with separate sets of flags. We assume that being able to compile with Clang is a prerequisite to running clang-ti

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-22 Thread Ashley Coleman via cfe-commits
@@ -3158,6 +3172,166 @@ bool SPIRVInstructionSelector::selectFirstBitHigh(Register ResVReg, } } +bool SPIRVInstructionSelector::selectFirstBitLow16(Register ResVReg, + const SPIRVType *ResType, +

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-22 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/116858 >From eeb864972c48625fa56b96e6b018affe04d84e00 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Thu, 14 Nov 2024 11:53:39 -0700 Subject: [PATCH 1/4] [HLSL] Implement elementwise firstbitlow builtin --- clan

[clang] [Clang] Add Doug Wyatt and myself as maintainers for function effect analysis (PR #117324)

2024-11-22 Thread Doug Wyatt via cfe-commits
dougsonos wrote: LGTM thanks @Sirraide! https://github.com/llvm/llvm-project/pull/117324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/12880 Here is the rel

[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)

2024-11-22 Thread Ashley Coleman via cfe-commits
https://github.com/V-FEXrt updated https://github.com/llvm/llvm-project/pull/116858 >From eeb864972c48625fa56b96e6b018affe04d84e00 Mon Sep 17 00:00:00 2001 From: Ashley Coleman Date: Thu, 14 Nov 2024 11:53:39 -0700 Subject: [PATCH 1/5] [HLSL] Implement elementwise firstbitlow builtin --- clan

[clang] [CUDA] pass -fno-threadsafe-statics to GPU sub-compilations. (PR #117074)

2024-11-22 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/13471 Here is the r

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-22 Thread Chris B via cfe-commits
@@ -300,6 +301,36 @@ static MDTuple *emitTopLevelLibraryNode(Module &M, MDNode *RMD, return constructEntryMetadata(nullptr, nullptr, RMD, Properties, Ctx); } +// TODO: We might need to refactor this to be more generic, +// in case we need more metadata to be replaced. +stat

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-22 Thread Chris B via cfe-commits
@@ -2694,19 +2694,41 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, } return MIB.constrainAllUses(TII, TRI, RBI); } - case Intrinsic::spv_loop_merge: - case Intrinsic::spv_selection_merge: { -const auto Opcode = IID == Intrinsic::spv_select

[clang] [llvm] [HLSL] Adding Flatten and Branch if attributes (PR #116331)

2024-11-22 Thread Chris B via cfe-commits
@@ -1206,6 +1202,20 @@ class SPIRVStructurizer : public FunctionPass { AU.addPreserved(); FunctionPass::getAnalysisUsage(AU); } + + void createOpSelectMerge(IRBuilder<> *Builder, BlockAddress *MergeAddress) { +Instruction *BBTerminatorInst = Builder->GetInsertBlo

[clang] [clang] recognize any *-ld.lld variant (PR #117338)

2024-11-22 Thread via cfe-commits
https://github.com/SidManning approved this pull request. https://github.com/llvm/llvm-project/pull/117338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] hexagon: fix link order for libc/builtins (PR #117057)

2024-11-22 Thread via cfe-commits
https://github.com/SidManning approved this pull request. https://github.com/llvm/llvm-project/pull/117057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-22 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_permlane16_swap_b32 and v_permlane32_swap_b32 for gfx950 (PR #117260)

2024-11-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/117260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] AMDGPU: Add v_permlane16_swap_b32 and v_permlane32_swap_b32 for gfx950 (PR #117260)

2024-11-22 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. https://github.com/llvm/llvm-project/pull/117260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX] Fix AIX BuildBot failure as AIX linker doesn't support version script. (PR #117342)

2024-11-22 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: Doesn't eaa0a21d21962280dc2c03a09152510f6162a576 already fix this? If `CMAKE_SYSTEM_NAME` is `Linux`, it can probably not be `AIX` at the same time, right? See also the discussion on #116556. Do you mind if I revert this? https://github.com/llvm/llvm-project/pull/117342 __

[clang] [AIX] Fix AIX BuildBot failure as AIX linker doesn't support version script. (PR #117342)

2024-11-22 Thread Aaron Puchert via cfe-commits
@@ -48,11 +48,13 @@ add_clang_library(clang-cpp ${_OBJECTS} LINK_LIBS ${_DEPS}) +# AIX linker does not support version script +if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX") + configure_file(simple_version_script.map.in simple

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-22 Thread Alex Voicu via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-22 Thread Chris B via cfe-commits
@@ -784,6 +785,17 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D, const ParsedAttr &AL) { HLSLSV_DispatchThreadIDAttr(getASTContext(), AL)); } +void SemaHLSL::handleSV_GroupIDAttr(Decl *D, const ParsedAttr &AL) { + auto *VD = cast(D); + if (!isLega

[clang] [HLSL] Implement SV_GroupID semantic (PR #115911)

2024-11-22 Thread Chris B via cfe-commits
@@ -784,6 +785,17 @@ void SemaHLSL::handleSV_DispatchThreadIDAttr(Decl *D, const ParsedAttr &AL) { HLSLSV_DispatchThreadIDAttr(getASTContext(), AL)); } +void SemaHLSL::handleSV_GroupIDAttr(Decl *D, const ParsedAttr &AL) { + auto *VD = cast(D); + if (!isLega

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-22 Thread Joseph Huber via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [compiler-rt] [libunwind] [llvm] [clang] recognize any *-ld.lld variant (PR #117338)

2024-11-22 Thread Brian Cain via cfe-commits
@@ -294,9 +294,11 @@ constructHexagonLinkArgs(Compilation &C, const JobAction &JA, bool IncStartFiles = !Args.hasArg(options::OPT_nostartfiles); bool IncDefLibs = !Args.hasArg(options::OPT_nodefaultlibs); bool UseG0 = false; - const char *Exec = Args.MakeArgString(HTC.G

[clang] dd8d85d - [webkit.UncountedLambdaCapturesChecker] Ignore lambda invocation with arguments (#117394)

2024-11-22 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-11-22T16:42:39-08:00 New Revision: dd8d85dba6e8f74a55fb5053107797e21894a0c6 URL: https://github.com/llvm/llvm-project/commit/dd8d85dba6e8f74a55fb5053107797e21894a0c6 DIFF: https://github.com/llvm/llvm-project/commit/dd8d85dba6e8f74a55fb5053107797e21894a0c6.diff

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-22 Thread Alex Voicu via cfe-commits
@@ -296,18 +296,25 @@ void AggExprEmitter::withReturnValueSlot( (RequiresDestruction && Dest.isIgnored()); Address RetAddr = Address::invalid(); - RawAddress RetAllocaAddr = RawAddress::invalid(); EHScopeStack::stable_iterator LifetimeEndBlock; llvm

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore lambda invocation with arguments (PR #117394)

2024-11-22 Thread Ryosuke Niwa via cfe-commits
rniwa wrote: Thanks for the review! https://github.com/llvm/llvm-project/pull/117394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [webkit.UncountedLambdaCapturesChecker] Ignore lambda invocation with arguments (PR #117394)

2024-11-22 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/117394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-22 Thread Nicolas van Kempen via cfe-commits
@@ -183,38 +210,43 @@ void UseStartsEndsWithCheck::check(const MatchFinder::MatchResult &Result) { const auto *EndsWithFunction = Result.Nodes.getNodeAs("ends_with_fun"); assert(bool(StartsWithFunction) != bool(EndsWithFunction)); + const CXXMethodDecl *Replacemen

[clang-tools-extra] [clang-tidy] Enhance modernize-use-starts-ends-with to handle substr patterns (PR #116033)

2024-11-22 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank approved this pull request. LGTM minus 1 nit. Thanks! https://github.com/llvm/llvm-project/pull/116033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >