[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] [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-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] 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] [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] [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] [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] [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] [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] [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] [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 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][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][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
@@ -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][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] [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] [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] [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] 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] [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] [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] [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] [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] [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] [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
@@ -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] Add CHECK-LABEL to avoid source tree path sensitivity in test (PR #112461)

2024-10-15 Thread Tex Riddell via cfe-commits
https://github.com/tex3d created https://github.com/llvm/llvm-project/pull/112461 The test `clang/test/CodeGen/2004-02-20-Builtins.c` will erroneously fail if "builtin" is in the path to your source tree. This change adds a `CHECK-LABEL !llvm.ident` after the `CHECK-NOT` to avoid searching in

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-10-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @dmpolukhin I am still confusing about the problem. I mean, why your previous patch will break the reproducer and why this patch can "fix" it? I feel the current patch is somewhat workaround. It's not your fault. The original codes are somewhat tricky already. But let's try t

[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,218 @@ +//===-- CachedConstAccessorsLattice.h ---*- 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] [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,218 @@ +//===-- CachedConstAccessorsLattice.h ---*- 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] [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

[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

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

2024-10-15 Thread Fangrui Song via cfe-commits
MaskRay wrote: Personally I hope that `-mrelax` stays > > How about now? > > The patch doesn't touch lld, so my suggestion is "[Driver] Default enable > LoongArch linker relaxation". > > Some additional comments: > > * Do we need to consider the `-gsplit-dwarf` issue [MC: "error: A dwo sect

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/112381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Matheus Izvekov via cfe-commits
@@ -2085,7 +2085,9 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl, class ClassTemplatePartialSpecializationDecl : public ClassTemplateSpecializationDecl { /// The list of template parameters - TemplateParameterList* TemplateParams = nullptr; + TemplatePa

[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
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] [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] 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] [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] [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][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 Jinyang He 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] [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 edited https://github.com/llvm/llvm-project/pull/112049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[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: I've now investigated custom-section-name.ll more. With bulk-memory, we get a `__wasm_init_memory` function: ``` (module $custom-sect

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-15 Thread Florian Mayer via cfe-commits
fmayer wrote: An example dump that is now possible but crashed before ![image](https://github.com/user-attachments/assets/21e4ce35-4bf2-41dd-9a65-32dedb82723a) https://github.com/llvm/llvm-project/pull/112457 ___ cfe-commits mailing list cfe-commits@l

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

2024-10-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. This LGTM, but I guess we need to wait until Emscripten disables them by default, because there are some failing Emscripten tests and Binaryen doesn't yet have lowering passes for these. I don't think we need to block this on all these; we

[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: Thanks for the explanation! https://github.com/llvm/llvm-project/pull/112049 ___ cfe-commits

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Florian Mayer (fmayer) Changes We have an internal analysis that uses them, and the HTML dump would fail on the assertion. --- Full diff: https://github.com/llvm/llvm-project/pull/112457.diff 1 Files Affected: - (modified) clang/lib/An

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Florian Mayer (fmayer) Changes We have an internal analysis that uses them, and the HTML dump would fail on the assertion. --- Full diff: https://github.com/llvm/llvm-project/pull/112457.diff 1 Files Affected: - (modified) cla

[clang] [FlowSensitive] Allow to dump nested RecordStorageLocation (PR #112457)

2024-10-15 Thread Florian Mayer via cfe-commits
https://github.com/fmayer created https://github.com/llvm/llvm-project/pull/112457 We have an internal analysis that uses them, and the HTML dump would fail on the assertion. >From 4264fe1dfed3fc54f339ad4a769d76158c5ee7d5 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 15 Oct 2024 17:

[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] [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
@@ -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
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] [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] [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] [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] [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
@@ -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
@@ -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 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] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Younan Zhang via cfe-commits
@@ -2085,7 +2085,9 @@ class ClassTemplateSpecializationDecl : public CXXRecordDecl, class ClassTemplatePartialSpecializationDecl : public ClassTemplateSpecializationDecl { /// The list of template parameters - TemplateParameterList* TemplateParams = nullptr; + TemplatePa

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. LG modulo one question. Thanks for the prompt fix. https://github.com/llvm/llvm-project/pull/112381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [Clang][Sema] Use the correct injected template arguments for partial specializations when collecting multi-level template argument lists (PR #112381)

2024-10-15 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/112381 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,129 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

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

2024-10-15 Thread via cfe-commits
beetrees wrote: Clang currently always gives `__int128` and `__uint128` an alignment of 16 bytes (128 bits), except on SystemZ where they have an alignment of 8 bytes (64 bits). I'm not aware of any MIPS ABI specification that includes 128-bit integers, but an alignment of 16 bytes is used by

[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/5] [WebAssembly] Enable nontrapping-fptoint and bulk-memory b

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Hubert Tong via cfe-commits
@@ -8,14 +8,19 @@ target triple = "powerpc-ibm-aix" ; CHECK-RW: .csect __llvm_covinit[RW],3 ; CHECK-RO: .csect __llvm_covinit[RO],3 -; CHECK: .vbyte 4, __llvm_gcov_writeout[DS] -; CHECK-NEXT:.vbyte 4, __llvm_gcov_reset[DS] -; CHECK: __llvm_gcov_ctr.1: +; CHECK-NE

[clang] Add arrangeCXXMethodCall to the CodeGenABITypes interface. (PR #111597)

2024-10-15 Thread Hiroshi Yamauchi via cfe-commits
https://github.com/hjyamauchi updated https://github.com/llvm/llvm-project/pull/111597 >From ae4cdf4458b84b5fe5ab22f1ef4b5ceaf439a4f0 Mon Sep 17 00:00:00 2001 From: Hiroshi Yamauchi Date: Thu, 10 Oct 2024 13:50:01 -0700 Subject: [PATCH] Add arrangeCXXMethodCall to the CodeGenABITypes interface.

[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 @llvm-beanz and @jhuber6 Thanks so much for all the feedback and discussion here. I am very much grateful for both your time and insights here. I will try to give my answers in this comment. An overview of the SYCL compilation flow (with a bit more emphasis on the device 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: > I think we could all benefit from some documentation describing how the SYCL > compiler flow is intended to work, what tools are added/modified, and what > the expected outputs are at each compiler phase. Without some idea of the > architecture of what is being built changes l

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

2024-10-15 Thread Jan Svoboda via cfe-commits
@@ -4905,6 +4905,10 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, this->BaseDirectory.clear(); WritingAST = false; + + if (WritingModule) +updateModuleTimestamp(OutputFile); jansvoboda11 wrote: Calling this here is a b

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

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes Clang uses timestamp files to track the last time an implicitly-built PCM file was verified to be up-to-date with regard to its inputs. With `-fbuild-session-{file,timestamp}=` and `-fmodules-validate-

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

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes Clang uses timestamp files to track the last time an implicitly-built PCM file was verified to be up-to-date with regard to its inputs. With `-fbuild-session-{file,timestamp}=` and `-fmodules-v

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

2024-10-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/112452 Clang uses timestamp files to track the last time an implicitly-built PCM file was verified to be up-to-date with regard to its inputs. With `-fbuild-session-{file,timestamp}=` and `-fmodules-validate-on

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

2024-10-15 Thread Sam Clegg 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 sbc100 wrote: I was thinking that might make

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

2024-10-15 Thread Adam Yang 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][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
llvm-beanz wrote: I think we could all benefit from some documentation describing how the SYCL compiler flow is intended to work, what tools are added/modified, and what the expected outputs are at each compiler phase. Without some idea of the architecture of what is being built changes like t

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

2024-10-15 Thread Adam Yang via cfe-commits
https://github.com/adam-yang updated https://github.com/llvm/llvm-project/pull/111883 >From 0f97b92617dcadd78362f24f3ef0719c19f6f3f6 Mon Sep 17 00:00:00 2001 From: Adam Yang Date: Thu, 10 Oct 2024 10:20:37 -0700 Subject: [PATCH 1/6] Added the intrinsic to clang --- clang/include/clang/Basic/B

[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: This is an LTO test, so t

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Hubert Tong via cfe-commits
@@ -0,0 +1,129 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

[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: > LLD has a wasm target. Exactly what I meant. > I think LLD also needs to eventually gain a SPIR-V target to support linking > SPIR-V binaries, because SPIR-V does support linkage at the SPIR-V level not > just the LTO IR level (see: > https://registry.khronos.org/SPIR-V/spec

[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
llvm-beanz wrote: > I guess the closest analogue would be the WASM target? LLD has a wasm target. > It seems like overkill since the `ld.lld` source code doesn't really share > much code and this target pretty much only consumes LLVM-IR. I think LLD also needs to eventually gain a SPIR-V targ

[libunwind] [libunwind][AIX] Remove weak declaration "__xlcxx_personality_v0" (PR #112436)

2024-10-15 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: @xingxue-ibm, I edited the PR description text. Please check my edits. https://github.com/llvm/llvm-project/pull/112436 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

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

2024-10-15 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: Note, there is also dpp8 with the similar problem. But dpp8 is not properly handled even if intrinsic is used with a 64-bit type (i.e. not split into 2 separate 32-bit dpp ops). This would be a nice to have, but not absolutely necessary like here, because there are no 64-bit re

  1   2   3   4   5   6   >