[clang] [llvm] [ARM] Fix -mno-omit-leaf-frame-pointer flag doesn't works on 32-bit ARM (PR #109628)

2024-10-15 Thread Eli Friedman via cfe-commits
@@ -125,6 +125,11 @@ Changes to the ARM Backend the required alignment space with a sequence of `0x0` bytes (the requested fill value) rather than NOPs. +* The default behavior for frame pointers in leaf functions has been updated. When + `-fno-omit-frame-pointer` is spe

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Earlier test fail due to lack of new tool in clang/test/lit.cfg.py. Added it now. Thanks https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Can you also add a release note to clang/docs/ReleaseNotes.rst so users know about the new flag? https://github.com/llvm/llvm-project/pull/112378 ___ cfe-commits mailing list cfe-commit

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -95,7 +95,19 @@ void SPIRV::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); + // Use of --sycl-link will call the clang-sycl-link-wrapper instead of + // the default linker (spirv-link). + i

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
@@ -302,27 +307,43 @@ void Sema::DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID) { if (const Decl *FD = CE->getCalleeDecl()) { if (ShouldSuppress) return; - if (FD->hasAttr()) { -Diag(Loc, diag::warn_unused_call) << R1 << R2 << "pure"; -

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
https://github.com/Mick235711 edited https://github.com/llvm/llvm-project/pull/112289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
https://github.com/Mick235711 updated https://github.com/llvm/llvm-project/pull/112289 >From aaad12bcc38cfd11597e2e0c5ba93f2197e5a4ac Mon Sep 17 00:00:00 2001 From: Yihe Li Date: Tue, 15 Oct 2024 08:13:22 +0800 Subject: [PATCH] [clang] Generate note on declaration for nodiscard-related attribu

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-15 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected inbelic wrote: Will forward this comment here about `-verify-ignore-unexpected`: https

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-15 Thread Finn Plummer via cfe-commits
@@ -2018,6 +2018,11 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_group_memory_barrier_with_group_sync: { +if (SemaRef.checkArgCountAtMost(TheCall, 0)) ---

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-15 Thread Finn Plummer via cfe-commits
https://github.com/inbelic approved this pull request. LGTM, just a couple nits. https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-15 Thread Finn Plummer via cfe-commits
@@ -4830,6 +4830,12 @@ def HLSLRadians : LangBuiltin<"HLSL_LANG"> { let Prototype = "void(...)"; } +def HLSLGroupMemoryBarrierWithGroupSync: LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_group_memory_barrier_with_group_sync"]; + let Attributes = [NoThrow, C

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Modified the test to just use empty files. Change can be found in 307c74ea4f910a7698a6084db710ff7b699c5c93 Thanks https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-com

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-15 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -0,0 +1,528 @@ +//=-- clang-sycl-link-wrapper/ClangSYCLLinkWrapper.cpp - SYCL linker util --=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
@@ -0,0 +1,528 @@ +//=-- clang-sycl-link-wrapper/ClangSYCLLinkWrapper.cpp - SYCL linker util --=// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apac

[clang] [clang] Generate note on declaration for nodiscard-related attributes (PR #112289)

2024-10-15 Thread Yihe Li via cfe-commits
https://github.com/Mick235711 updated https://github.com/llvm/llvm-project/pull/112289 >From b9911d5b997306376fcf5348a24f8bae7b71bfeb Mon Sep 17 00:00:00 2001 From: Yihe Li Date: Tue, 15 Oct 2024 08:13:22 +0800 Subject: [PATCH] [clang] Generate note on declaration for nodiscard-related attribu

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: Hi @jhuber6 I have addressed all the concerns to my best ability. Thanks very much for your guidance and feedback thus far. Thanks Sincerely https://github.com/llvm/llvm-project/pull/112245 ___ cfe-commits mailing list cfe-commits@l

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/111203 >From f545a14e11556c91d10b14617e3588fe5eae6d42 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Fri, 4 Oct 2024 12:21:51 -0700 Subject: [PATCH 1/5] [HLSL] Collect explicit resource binding information (part 1)

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-15 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw created https://github.com/llvm/llvm-project/pull/112477 This patches add a string attribute "hw-shadow-stack" to every function if `-fcf-protection=return` is set on RISC-V >From 2a7a6ef1b44f250abf840165bac4c91ca0af928b Mon Sep 17 00:00:00 2001 From: Jesse Huang Dat

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jesse Huang (jaidTw) Changes This patches add a string attribute "hw-shadow-stack" to every function if `-fcf-protection=return` is set on RISC-V --- Full diff: https://github.com/llvm/llvm-project/pull/112477.diff 2 Files Affected: -

[clang] [clang-format] add MaxSingleLinesInBracedList style option (PR #112482)

2024-10-15 Thread Gedare Bloom via cfe-commits
https://github.com/gedare created https://github.com/llvm/llvm-project/pull/112482 The use of Cpp11BracedListStyle with BinPackParameters=False avoids bin packing until reaching a hard-coded limit of 20 items. This is an arbitrary choice. Introduce a new style option to allow setting a configu

[clang] b8882be - Revert "Update llvm::Registry to work for LLVM shared library builds on windows (#109024)"

2024-10-15 Thread Vassil Vassilev via cfe-commits
Author: Vassil Vassilev Date: 2024-10-16T06:03:45Z New Revision: b8882be26f00d2a053269948ee6ecaeff8db8eb8 URL: https://github.com/llvm/llvm-project/commit/b8882be26f00d2a053269948ee6ecaeff8db8eb8 DIFF: https://github.com/llvm/llvm-project/commit/b8882be26f00d2a053269948ee6ecaeff8db8eb8.diff LO

[clang] [clang-format] add MaxSingleLinesInBracedList style option (PR #112482)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format @llvm/pr-subscribers-clang Author: Gedare Bloom (gedare) Changes The use of Cpp11BracedListStyle with BinPackParameters=False avoids bin packing until reaching a hard-coded limit of 20 items. This is an arbitrary choice. Introduce a new st

[clang] [clang-format] add MaxSingleLinesInBracedList style option (PR #112482)

2024-10-15 Thread Gedare Bloom via cfe-commits
gedare wrote: For the history, see https://github.com/llvm/llvm-project/issues/20997 https://github.com/llvm/llvm-project/pull/112482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Helena Kotas via cfe-commits
@@ -4593,6 +4593,44 @@ def HLSLResourceBinding: InheritableAttr { let LangOpts = [HLSL]; let Args = [StringArgument<"Slot">, StringArgument<"Space", 1>]; let Documentation = [HLSLResourceBindingDocs]; + let AdditionalMembers = [{ + enum class RegisterType : unsigned

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

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

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

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

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Helena Kotas via cfe-commits
@@ -102,6 +152,15 @@ class SemaHLSL : public SemaBase { llvm::DenseMap LocsForHLSLAttributedResources; + + // List of all resource bindings + ResourceBindings Bindings; + +private: + void FindResourcesOnVarDecl(VarDecl *D); + void FindResourcesOnUserRecordDecl(const

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-15 Thread via cfe-commits
yingopq wrote: > Also, what alignment does clang use for o32 with ForceEnableInt128 I did test about o32 with ForceEnableInt128: ``` $ cat 1.c #include int main() { printf("alignment of int128: %zd\n", _Alignof(__int128)); return 0; } $ sudo ./build/bin/clang -target mipsel-unknown-li

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Helena Kotas via cfe-commits
@@ -2235,3 +2280,107 @@ QualType SemaHLSL::getInoutParameterType(QualType Ty) { Ty.addRestrict(); return Ty; } + +void SemaHLSL::ActOnVariableDeclarator(VarDecl *VD) { + if (VD->hasGlobalStorage()) { +// make sure the declaration has a complete type +if (SemaRef.Re

[clang] [clang][bytecode] Implement the constexpr built-in abs function. (PR #112459)

2024-10-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: > This patch fixes the issue. What issue? Is there a bug open about this? You didn't implement it for the bytecode interpreter at all, only for the current interpreter. https://github.com/llvm/llvm-project/pull/112459 ___ cfe-commits

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2024-10-15 Thread Gedare Bloom via cfe-commits
gedare wrote: ping https://github.com/llvm/llvm-project/pull/108332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4c2c177 - [LoongArch] Add options for annotate tablejump

2024-10-15 Thread via cfe-commits
Author: wanglei Date: 2024-10-16T11:58:00+08:00 New Revision: 4c2c177567390cd3d8de3fd757e9234f1da832b7 URL: https://github.com/llvm/llvm-project/commit/4c2c177567390cd3d8de3fd757e9234f1da832b7 DIFF: https://github.com/llvm/llvm-project/commit/4c2c177567390cd3d8de3fd757e9234f1da832b7.diff LOG:

[clang] [Clang][TableGen] Use const pointers for various Init objects in MveEmitter (PR #112320)

2024-10-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/112320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

2024-10-15 Thread via cfe-commits
https://github.com/wangleiat closed https://github.com/llvm/llvm-project/pull/102411 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement the constexpr built-in abs function. (PR #112459)

2024-10-15 Thread via cfe-commits
c8ef wrote: This issue arose when I was trying to address https://github.com/llvm/llvm-project/issues/51787, which concerns vector operations built-ins. I wanted to see how the single versions were implemented, only to discover that `__builtin_abs` cannot be evaluated in a constexpr context.

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Helena Kotas via cfe-commits
@@ -1121,6 +1121,11 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn, if (Decls[i]) EmitRuntimeCall(Decls[i]); +if (getLangOpts().HLSL) + if (llvm::Function *ResInitFn = + CGM.getHLSLRuntime().createResourceBindingInitFn())

[clang] [RISCV][FMV] Remove support for negative priority (PR #112161)

2024-10-15 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/112161 >From d7a00a878b472e1ba7abad1b915cb57c4b0a5ca3 Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Sun, 6 Oct 2024 22:19:07 -0700 Subject: [PATCH 1/2] [RISCV][FMV] Remove support for negative priority --- clang/lib/Co

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-15 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 4db57ab958f5bac1d85927a955f989625badf962 2a7a6ef1b44f250abf840165bac4c91ca0af928b --e

[clang] [AMDGPU] Allow overload of __builtin_amdgcn_mov/update_dpp (PR #112447)

2024-10-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: This needs some sema type restrictions to make sure it's something sensible https://github.com/llvm/llvm-project/pull/112447 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [clang][bytecode] Implement the constexpr built-in abs function. (PR #112459)

2024-10-15 Thread via cfe-commits
c8ef wrote: > > This patch fixes the issue. > > What issue? Is there a bug open about this? > > You didn't implement it for the bytecode interpreter at all, only for the > current interpreter. Yes, I realized that. Apologies for the oversight. I will add the implementation to `InterpBuiltin.

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-darwin` running on `doug-worker-3` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/23/builds/3882 Here is

[clang] [Sema] Fix warning in SemaOpenACC.cpp (PR #112481)

2024-10-15 Thread Karl-Johan Karlsson via cfe-commits
https://github.com/karka228 created https://github.com/llvm/llvm-project/pull/112481 Fix gcc warning: clang/lib/Sema/SemaOpenACC.cpp:2208:5: warning: this statement may fall through [-Wimplicit-fallthrough=] >From 1015e28263bdfafd62c061200163899d0f8a7f69 Mon Sep 17 00:00:00 2001 From: Karl-Jo

[clang] [Sema] Fix warning in SemaOpenACC.cpp (PR #112481)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Karl-Johan Karlsson (karka228) Changes Fix gcc warning: clang/lib/Sema/SemaOpenACC.cpp:2208:5: warning: this statement may fall through [-Wimplicit-fallthrough=] --- Full diff: https://github.com/llvm/llvm-project/pull/112481.diff 1 Fi

[clang] [clang][bytecode] Implement the constexpr built-in abs function. (PR #112459)

2024-10-15 Thread via cfe-commits
https://github.com/c8ef updated https://github.com/llvm/llvm-project/pull/112459 >From dfa1585af3f080987cbd15830c45c34bfecc1fca Mon Sep 17 00:00:00 2001 From: c8ef Date: Wed, 16 Oct 2024 01:18:13 + Subject: [PATCH 1/5] implement constexpr builtin {l}abs --- clang/include/clang/Basic/Builti

[clang] [llvm] Update llvm::Registry to work for LLVM shared library builds on windows (PR #109024)

2024-10-15 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-libcxx` running on `linaro-flang-aarch64-libcxx` while building `clang,llvm` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/89/builds/8505 Here is the r

[clang] [clang-format] add MaxSingleLinesInBracedList style option (PR #112482)

2024-10-15 Thread Gedare Bloom via cfe-commits
https://github.com/gedare edited https://github.com/llvm/llvm-project/pull/112482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] add MaxSingleLinesInBracedList style option (PR #112482)

2024-10-15 Thread Gedare Bloom via cfe-commits
gedare wrote: I would also be ok to have a style option to make the existing 20-item limit optional (but enabled by default). That might be a little more maintainable than allowing arbitrary limits to be used. There will be bugs if/when people use this option with small values for the limit, a

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-10-15 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Hello, sorry I missed your earlier notification. Your test case further reduces to: https://godbolt.org/z/q6ndebaeW ```C++ template struct Traits { using Type = Traits; }; template void FillVRegs(typename Traits::Type...); template void FillVRegs(typename Traits::Type); voi

[clang] [llvm] [HLSL] Add handle initialization for simple resource declarations (PR #111207)

2024-10-15 Thread Helena Kotas via cfe-commits
@@ -489,3 +494,100 @@ void CGHLSLRuntime::generateGlobalCtorDtorCalls() { GV->eraseFromParent(); } } + +// Returns handle type of a resource, if the type is a resource +// or an array of resources +static const HLSLAttributedResourceType *findHandleTypeOnResource(QualTy

[clang] [Clang][RISCV] Support -fcf-protection=return for RISC-V (PR #112477)

2024-10-15 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw edited https://github.com/llvm/llvm-project/pull/112477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-10-15 Thread Yi Kong via cfe-commits
kongy wrote: @mizvekov Gentle ping... https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various `Init *` pointers in SA checker emitter (PR #112321)

2024-10-15 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/112321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Extend pointer TBAA to pointers of non-builtin types. (PR #110569)

2024-10-15 Thread John McCall via cfe-commits
https://github.com/rjmccall requested changes to this pull request. https://github.com/llvm/llvm-project/pull/110569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Extend pointer TBAA to pointers of non-builtin types. (PR #110569)

2024-10-15 Thread John McCall via cfe-commits
@@ -221,21 +221,27 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { PtrDepth++; Ty = Ty->getPointeeType().getTypePtr(); } while (Ty->isPointerType()); -// TODO: Implement C++'s type "similarity" and consider dis-"similar" -// pointers d

[clang] [TBAA] Extend pointer TBAA to pointers of non-builtin types. (PR #110569)

2024-10-15 Thread John McCall via cfe-commits
@@ -221,21 +221,27 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { PtrDepth++; Ty = Ty->getPointeeType().getTypePtr(); } while (Ty->isPointerType()); -// TODO: Implement C++'s type "similarity" and consider dis-"similar" -// pointers d

[clang] [TBAA] Extend pointer TBAA to pointers of non-builtin types. (PR #110569)

2024-10-15 Thread John McCall via cfe-commits
@@ -221,21 +221,27 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { PtrDepth++; Ty = Ty->getPointeeType().getTypePtr(); } while (Ty->isPointerType()); -// TODO: Implement C++'s type "similarity" and consider dis-"similar" -// pointers d

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Erich Keane via cfe-commits
@@ -83,7 +83,7 @@ getCategoryFromDiagGroup(const Record *Group, static std::string getDiagnosticCategory(const Record *R, DiagGroupParentMap &DiagGroupParents) { // If the diagnostic is in a group, and that group has a category, use i

[clang] [clang-cl]: Add /std:c++23preview and update _MSVC_LANG for C++23 (PR #112378)

2024-10-15 Thread Casey Carter via cfe-commits
https://github.com/CaseyCarter approved this pull request. https://github.com/llvm/llvm-project/pull/112378 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Use const pointers for various Init objects in Diagnostic Emitter (PR #112318)

2024-10-15 Thread Rahul Joshi via cfe-commits
@@ -83,7 +83,7 @@ getCategoryFromDiagGroup(const Record *Group, static std::string getDiagnosticCategory(const Record *R, DiagGroupParentMap &DiagGroupParents) { // If the diagnostic is in a group, and that group has a category, use i

[clang] [Clang][TableGen] Use const pointers for various Init objects in MveEmitter (PR #112320)

2024-10-15 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/112320 >From 2e73179e5e936eb9ea4099f5d71fe7d859a95306 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Mon, 14 Oct 2024 23:09:33 -0700 Subject: [PATCH] [Clang][TableGen] MveEmitter --- clang/utils/TableGen/MveEmitter

[clang] [llvm] [MTE] Apply alignment / size in AsmPrinter rather than IR (PR #111918)

2024-10-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/111918 >From 3a962270521aa7b48b64e5ac5fa0edb900990023 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 10 Oct 2024 16:05:50 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

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

[clang] [HLSL] Collect explicit resource binding information (PR #111203)

2024-10-15 Thread Helena Kotas via cfe-commits
hekota wrote: > I have to admit I'm pretty confused about what the code is trying to do - the > ratio of new code added to new tests / changes to the tests is a bit > surprising. This means I can't look at the tests to try and understand what > the code change is for, but it also points at may

[clang] [clang] Check null TypeSourceInfo in CreateUnaryExprOrTypeTraitExpr (PR #112111)

2024-10-15 Thread Vlad Serebrennikov via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +a() {struct b c (sizeof(b * [({ {tree->d* next)} 0 + +// expected-error@3 {{a type specifier is required for all declarations}} +// expected-error@3 {{use of undeclared identifier 'tree'; did you mean 'true'?}} +//

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-15 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/111010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTWriter] Detect more non-affecting FileIDs to reduce source location duplication (PR #112015)

2024-10-15 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: I was looking at the affecting module map logic for a reason unrelated to yours, but ended up needing something similar to what you're trying to achieve. Here's an example: ``` //--- X1.modulemap module X1 { header "X1.h" } //--- X2.modulemap module X2 { header "X2.h" } //-

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
https://github.com/asudarsa updated https://github.com/llvm/llvm-project/pull/112245 >From eff4a0300336c4c106e1d293b19e795f5ccbabc1 Mon Sep 17 00:00:00 2001 From: Arvind Sudarsanam Date: Fri, 27 Sep 2024 13:03:12 -0700 Subject: [PATCH 1/7] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link

[clang] [clang][OpenCL][CodeGen][AMDGPU] Do not use `private` as the default AS for when `generic` is available (PR #112442)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alex Voicu (AlexVlx) Changes Currently, for AMDGPU, when compiling for OpenCL, we unconditionally use `private` as the default address space. This is wrong for cases where the `generic` address space is available, and is corrected via thi

[clang] [clang][OpenCL][CodeGen][AMDGPU] Do not use `private` as the default AS for when `generic` is available (PR #112442)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Alex Voicu (AlexVlx) Changes Currently, for AMDGPU, when compiling for OpenCL, we unconditionally use `private` as the default address space. This is wrong for cases where the `generic` address space is available, and is corrected

[clang] [clang][HIP] Don't use the OpenCLKernel CC when targeting AMDGCNSPIRV (PR #110447)

2024-10-15 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/110447 >From f65d933740225122d832a340b89fe4da0d80a204 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 30 Sep 2024 03:09:58 +0100 Subject: [PATCH] Don't use the OpenCLKernel CC when targeting AMDGCNSPIRV. --- cla

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: Why is this a clang-based tool? Other than using clang/Basic to get the clang version (which could also be retrieved from LLVM), this doesn't seem to have any dependencies on Clang. As I'm seeing the SYCL patches coming in I'm getting concerned that the

[clang] [llvm] [clang][llvm][SPIR-V] Explicitly encode native integer widths for SPIR-V (PR #110695)

2024-10-15 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/110695 >From 758fb6e28844d89031b5497d651cb2a9b71b6a0e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 1 Oct 2024 17:10:50 +0100 Subject: [PATCH 1/2] Explicitly encode native integer widths for SPIR-V. --- clang/

[clang] [clang][OpenCL][CodeGen][AMDGPU] Do not use `private` as the default AS for when `generic` is available (PR #112442)

2024-10-15 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 34cdd67c854ba5a7ec557291861f948ef674375f ca9196266653dd796abfad9b4030090fc299eb8a --e

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz requested changes to this pull request. I'd really like to understand why this is a clang-level tool and get feedback from @AaronBallman before this goes further. https://github.com/llvm/llvm-project/pull/112245 ___ cfe-c

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Why is this a clang-based tool? Other than using clang/Basic to get the clang > version (which could also be retrieved from LLVM), this doesn't seem to have > any dependencies on Clang. > > As I'm seeing the SYCL patches coming in I'm getting concerned that the > architecture

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -1,9 +1,9 @@ ; REQUIRES: asserts -; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merg

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -151,8 +151,10 @@ bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const { auto addGenericFeatures = [&]() { +Features["bulk-memory"] = true; aheejin

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj %s -o %t.o +; RUN: llc -filetype=obj -mattr=-bulk-memory %s -o %t.o aheejin wrote: Why do we need to disable bulk memory here and in many other files? https://github.com/llvm/llvm-project/pull/112049

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -166,6 +166,8 @@ // GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}} +// GENERIC-INCLUDE-DAG: #define __wasm_nontrapping_fptoint__ 1{{$}} +//

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Dan Gohman via cfe-commits
@@ -1,9 +1,9 @@ ; REQUIRES: asserts -; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merg

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Chris B via cfe-commits
https://github.com/llvm-beanz commented: At a minimum I think this change needs more tests. There's a lot of code added with very minimal test coverage. I'm uncomfortable with adding a design that is effectively a workaround with an unwritten "TODO" to fix it up later, but I also don't want to

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > From the discourse post and everything I've found reading about the SYCL > tooling, it seems to me like this should really just all be integrated into > LLD and performed with the linking phase. It seems like a huge waste of IO to > read objects, rip out device-specific bits,

[clang] [Clang][SYCL] Introduce clang-sycl-link-wrapper to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-15 Thread Arvind Sudarsanam via cfe-commits
asudarsa wrote: > At a minimum I think this change needs more tests. There's a lot of code > added with very minimal test coverage. > > I'm uncomfortable with adding a design that is effectively a workaround with > an unwritten "TODO" to fix it up later, but I also don't want to needlessly >

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Dan Gohman via cfe-commits
https://github.com/sunfishcode updated https://github.com/llvm/llvm-project/pull/112049 >From 7d55b35158ceb1a5d35ac62ecfe404f6a374e526 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 11 Oct 2024 13:31:13 -0700 Subject: [PATCH 1/7] [WebAssembly] Enable nontrapping-fptoint and bulk-memory b

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Dan Gohman via cfe-commits
@@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj %s -o %t.o +; RUN: llc -filetype=obj -mattr=-bulk-memory %s -o %t.o sunfishcode wrote: In lld/test/wasm/custom-section-name.ll, it's because bulk-memory makes the target_features section bigger and thus changes some of t

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Dan Gohman via cfe-commits
@@ -166,6 +166,8 @@ // GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}} +// GENERIC-INCLUDE-DAG: #define __wasm_nontrapping_fptoint__ 1{{$}} +//

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Dan Gohman via cfe-commits
@@ -151,8 +151,10 @@ bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const { auto addGenericFeatures = [&]() { +Features["bulk-memory"] = true; sunfish

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Dan Gohman via cfe-commits
@@ -2,7 +2,7 @@ ; RUN: llvm-as -o %t.o %s ; RUN: llvm-as -o %t2.o %S/Inputs/libcall-archive.ll ; RUN: llvm-ar rcs %t.a %t2.o -; RUN: wasm-ld -o %t %t.o %t.a +; RUN: wasm-ld -mllvm -mattr=-bulk-memory -o %t %t.o %t.a sunfishcode wrote: Done https://github.com/

[clang] [clang][bytecode] Implement the constexpr built-in abs function. (PR #112459)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (c8ef) Changes The current built-in abs function cannot be used in a constexpr environment. This patch fixes the issue. See also: https://godbolt.org/z/s8x3Yd8ne. --- Full diff: https://github.com/llvm/llvm-project/pull/112459.diff

[clang] [clang][bytecode] Implement the constexpr built-in abs function. (PR #112459)

2024-10-15 Thread via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/112459 The current built-in abs function cannot be used in a constexpr environment. This patch fixes the issue. See also: https://godbolt.org/z/s8x3Yd8ne. >From dfa1585af3f080987cbd15830c45c34bfecc1fca Mon Sep 17 00:00:0

[clang] [lld] [Driver] Default enable LoongArch linker relaxation (PR #111488)

2024-10-15 Thread via cfe-commits
@@ -134,6 +134,12 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D, (!Args.hasArgNoClaim(clang::driver::options::OPT_march_EQ))) Features.push_back("+lsx"); + if (Args.hasFlag(options::OPT_mrelax, options::OPT_mno_relax, true)) { +Features.push_back

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-15 Thread Chuanqi Xu via cfe-commits
@@ -4905,6 +4905,10 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, this->BaseDirectory.clear(); WritingAST = false; + + if (WritingModule) +updateModuleTimestamp(OutputFile); ChuanqiXu9 wrote: Yeah, I'd like to make suc

[clang] 6d13cc9 - [HLSL] Implement `WaveReadLaneAt` intrinsic (#111010)

2024-10-15 Thread via cfe-commits
Author: Finn Plummer Date: 2024-10-15T18:49:40-07:00 New Revision: 6d13cc9411b998aabf1a55e0813236ba7a278929 URL: https://github.com/llvm/llvm-project/commit/6d13cc9411b998aabf1a55e0813236ba7a278929 DIFF: https://github.com/llvm/llvm-project/commit/6d13cc9411b998aabf1a55e0813236ba7a278929.diff

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

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

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/111006 >From f82e63e470f704f29f4c161579fd592c27301868 Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Thu, 3 Oct 2024 15:21:32 + Subject: [PATCH 1/4] [clang][dataflow] Add a lattice to help represent cache const acc

[clang] [llvm] [MIPS] LLVM data layout give i128 an alignment of 16 for mips64 (PR #112084)

2024-10-15 Thread via cfe-commits
yingopq wrote: > This looks technically fine, but I'm having trouble finding a normative > reference for this. Is there an ABI specification for N32/N64 somewhere? > > Also, what alignment does clang use for o32 with ForceEnableInt128? > > https://github.com/llvm/llvm-project/blob/cb2f16195754

[clang] [Modules][NFC] Rewrite friend-definition-2.cpp with split-file (PR #112380)

2024-10-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/112380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Jan Voung via cfe-commits
https://github.com/jvoung updated https://github.com/llvm/llvm-project/pull/111006 >From f82e63e470f704f29f4c161579fd592c27301868 Mon Sep 17 00:00:00 2001 From: Jan Voung Date: Thu, 3 Oct 2024 15:21:32 + Subject: [PATCH 1/3] [clang][dataflow] Add a lattice to help represent cache const acc

[clang] [clang][dataflow] Add a lattice to help cache const accessor methods (PR #111006)

2024-10-15 Thread Jan Voung via cfe-commits
@@ -0,0 +1,217 @@ +//===- unittests/Analysis/FlowSensitive/CachedConstAccessorsLatticeTest.cpp ==// +// +// 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

<    1   2   3   4   5   6   >