[clang] [clang][driver] Improve warning message for target AVR (PR #114394)

2024-10-31 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett commented: Maybe add " when no -mmcu option is used" to the commit title but otherwise LGTM. https://github.com/llvm/llvm-project/pull/114394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -455,6 +455,64 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute specifies that a function defini

[clang] [libunwind] [llvm] Replace documentation mentions of IRC with Discord (PR #114276)

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

[clang] 0ab44fd - Replace documentation mentions of IRC with Discord (#114276)

2024-10-31 Thread via cfe-commits
Author: Aaron Ballman Date: 2024-10-31T09:22:46-04:00 New Revision: 0ab44fd2464354dfdca0e7afacbb21a84bca46d9 URL: https://github.com/llvm/llvm-project/commit/0ab44fd2464354dfdca0e7afacbb21a84bca46d9 DIFF: https://github.com/llvm/llvm-project/commit/0ab44fd2464354dfdca0e7afacbb21a84bca46d9.diff

[clang] [flang] [clang] Add option to specify opt pipeline during offload lto (PR #114401)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: None (macurtis-amd) Changes Especially useful for experimenting with 'default' vs 'lto' pipelines. New driver option '-offload-lto-opt-pipeline=' is forwarded to clang-linker-wrapper as '-lto-opt-p

[clang] [flang] [clang] Add option to specify opt pipeline during offload lto (PR #114401)

2024-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: Can this be done through `-Xoffload-linker`? https://github.com/llvm/llvm-project/pull/114401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][SPIRV] Add HLSL type translation for spirv. (PR #114273)

2024-10-31 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/114273 >From 689f8d6be270321ffc1930162b318c134c9bb7f4 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Tue, 1 Oct 2024 09:56:20 -0400 Subject: [PATCH 1/2] [HLSL][SPIRV] Add HLSL type translation for spirv. This com

[clang] [HLSL][SPIRV] Add HLSL type translation for spirv. (PR #114273)

2024-10-31 Thread Steven Perron via cfe-commits
@@ -323,6 +327,83 @@ llvm::Type *CommonSPIRTargetCodeGenInfo::getOpenCLType(CodeGenModule &CGM, return nullptr; } +llvm::Type *CommonSPIRTargetCodeGenInfo::getHLSLType(CodeGenModule &CGM, + const Type *Ty) const { + auto

[clang] [clang-tools-extra] [llvm] [clang] Introduce diagnostics suppression mappings (PR #112517)

2024-10-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,92 @@ + +Warning suppression mappings + + +.. contents:: + :local: + +Introduction + + +Warning suppression mappings enables users to suppress clang's diagnostics in a +per-file granular manner. Enabl

[clang] [HLSL][SPIRV] Add HLSL type translation for spirv. (PR #114273)

2024-10-31 Thread Steven Perron via cfe-commits
https://github.com/s-perron converted_to_draft https://github.com/llvm/llvm-project/pull/114273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -0,0 +1,144 @@ +// Tests without serialization: +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-device \ +// RUN: -ast-dump %s \ +// RUN: | FileCheck --match-full-lines %s +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-unknown -fsycl-is-host \

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-31 Thread Aaron Ballman via cfe-commits
@@ -5116,11 +5123,34 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (const Arg *PF = Args.getLastArg(options::OPT_mprintf_kind_EQ)) PF->claim(); - if (Args.hasFlag(options::OPT_fsycl, options::OPT_fno_sycl, false)) { -CmdArgs.push_back("-fsycl-

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

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

2024-10-31 Thread via cfe-commits
Author: Arvind Sudarsanam Date: 2024-10-31T09:39:55-05:00 New Revision: 5a44bbf24f2f30a313ecf66e6a76de365658 URL: https://github.com/llvm/llvm-project/commit/5a44bbf24f2f30a313ecf66e6a76de365658 DIFF: https://github.com/llvm/llvm-project/commit/5a44bbf24f2f30a313ecf66e6a76de365658.d

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-10-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,184 @@ +//===--- 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] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2024-10-31 Thread Michael Jabbour via cfe-commits
https://github.com/michael-jabbour-sonarsource edited https://github.com/llvm/llvm-project/pull/114240 ___ 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-linker to link SYCL offloading device code (Part 1 of many) (PR #112245)

2024-10-31 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` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/89/builds/9528 Here is the releva

[clang] [lld] [llvm] [Windows] Add support for emitting PGO/LTO magic strings in the Windows PE debug directory (PR #114260)

2024-10-31 Thread Martin Storsjö via cfe-commits
@@ -0,0 +1,13 @@ +// This test checks if Window PE file compiled with -flto option contains a magic +// string "LTCG" to indicate LTO compilation. + +// REQUIRES: system-windows + +// RUN: %clang --target=x86_64-pc-windows-msvc -flto -fuse-ld=lld %s -o %t.exe ms

[clang] [clang] Fix a typo in clangs README (PR #114410)

2024-10-31 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang] Fix a typo in clangs README (PR #114410)

2024-10-31 Thread Philipp Rados via cfe-commits
https://github.com/PhilippRados created https://github.com/llvm/llvm-project/pull/114410 changed "disucss" to "discuss" >From 0932d191b4b260a0b6449124d4fd3735c3fc3291 Mon Sep 17 00:00:00 2001 From: PhilippR Date: Thu, 31 Oct 2024 15:30:10 +0100 Subject: [PATCH] [clang] Fix a typo in clangs REA

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

2024-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/114148 >From 8c76f28c8a0ba3d087361141366968071fa3af6e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 29 Oct 2024 16:02:26 -0700 Subject: [PATCH 1/2] [HLSL] Add Increment/DecrementCounter methods to structured b

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/112424 >From a22c6bae4f42f42e67f8e0c2b1f914e50d140099 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 15 Oct 2024 22:43:24 +0300 Subject: [PATCH 1/4] [Clang] prevent setting default lexical access specifier f

[clang] [llvm] [InstrPGO] Avoid using global variable to fix potential data race (PR #114364)

2024-10-31 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm closed https://github.com/llvm/llvm-project/pull/114364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Oleksandr T. via cfe-commits
@@ -585,10 +585,11 @@ Bug Fixes to C++ Support - Clang incorrectly considered a class with an anonymous union member to not be const-default-constructible even if a union member has a default member initializer. (#GH95854). -- Fixed an assertion failure when evaluating an

[clang] [clang-format] Add ConfigFile option (PR #113864)

2024-10-31 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/113864 >From 85f78a4879a37fb367dccd5299b35d1c75c2b46f Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Sun, 27 Oct 2024 22:22:11 -0700 Subject: [PATCH 1/2] [clang-format] Add ConfigFile option Closes #107808. --- clang/d

[clang] bef3b54 - [InstrPGO] Avoid using global variable to fix potential data race (#114364)

2024-10-31 Thread via cfe-commits
Author: Lei Wang Date: 2024-10-31T21:28:13-07:00 New Revision: bef3b54ea10a564a2de72f658f2efd64f537c079 URL: https://github.com/llvm/llvm-project/commit/bef3b54ea10a564a2de72f658f2efd64f537c079 DIFF: https://github.com/llvm/llvm-project/commit/bef3b54ea10a564a2de72f658f2efd64f537c079.diff LOG:

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

2024-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/114148 >From 8c76f28c8a0ba3d087361141366968071fa3af6e Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Tue, 29 Oct 2024 16:02:26 -0700 Subject: [PATCH 1/2] [HLSL] Add Increment/DecrementCounter methods to structured b

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > Mechanically, this pass can be replaced with trivial handling of the > intrinsic in AMDGPUInstCombineIntrinsic; we don't need a new module pass. As > inserted into the pipeline here, this does not have any advantage over > handling it directly in instcombine. Perhaps, except

[clang] df9769e - [Clang] prevent setting default lexical access specifier for missing primary declarations (#112424)

2024-10-31 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-01T13:13:33+08:00 New Revision: df9769e14b79048331c33deeda1a93acc9a4a73e URL: https://github.com/llvm/llvm-project/commit/df9769e14b79048331c33deeda1a93acc9a4a73e DIFF: https://github.com/llvm/llvm-project/commit/df9769e14b79048331c33deeda1a93acc9a4a73e.diff

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

2024-10-31 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Thanks! https://github.com/llvm/llvm-project/pull/112424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent setting default lexical access specifier for missing primary declarations (PR #112424)

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

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for L SX and LASX builtins (PR #114510)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114510 `-flax-vector-conversions=none` does not allow an implicit conversion from `signed char` vector to `char` vector, and we cannot remove `signed` from `v16i8` or `v32i8` because doing so will break our expectation w

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114513 The lsxintrin.h and and lasxintrin.h headers uses `unsigned char` vectors instead of `signed char` vectors. GCC also uses `unsigned char` for them, so align their definition with the headers and GCC. Fixes #

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for LSX and LASX builtins (PR #114510)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 edited https://github.com/llvm/llvm-project/pull/114510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][lex] Remove `-index-header-map` (PR #114459)

2024-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/114459 This PR removes the `-index-header-map` functionality from Clang. AFAIK this was only used internally at Apple and is now dead code. The main motivation behind this change is to enable the removal of `Head

[clang-tools-extra] Add bugprone-undefined-sprintf-overlap (PR #114244)

2024-10-31 Thread Chris Cotter via cfe-commits
https://github.com/ccotter updated https://github.com/llvm/llvm-project/pull/114244 >From fd914cc82688b122654d2d7ada72007541b197c0 Mon Sep 17 00:00:00 2001 From: Chris Cotter Date: Wed, 30 Oct 2024 10:54:49 -0400 Subject: [PATCH 1/4] Add bugprone-sprintf-overlap --- .../bugprone/BugproneTidyM

[clang] [clang][lex] Remove `-index-header-map` (PR #114459)

2024-10-31 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/114459 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][lex] Remove `HeaderFileInfo::Framework` (PR #114460)

2024-10-31 Thread Jan Svoboda via cfe-commits
@@ -2045,21 +2041,7 @@ namespace { LE.write( Writer.getIdentifierRef(Data.HFI.LazyControllingMacro.getPtr())); - unsigned Offset = 0; - if (!Data.HFI.Framework.empty()) { -// If this header refers into a framework, save the framework name.

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
@@ -21,6 +21,16 @@ using namespace clang; using namespace tooling; using namespace dependencies; +void ModuleDeps::forEachFileDep(llvm::function_ref Cb) const { + SmallString<0> PathBuf; + PathBuf.reserve(256); jansvoboda11 wrote: Curious what people think

[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

2024-10-31 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ok, abandoning in favor of #114457. https://github.com/llvm/llvm-project/pull/114079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Stop sorting file dependencies (PR #114079)

2024-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/114079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-31 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 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 a553c620b7d70dedd268aa2588e5e50e7dc6ccc8 3be61a8f1eecdc64c0df5d6635f5bf7809c31de4 --e

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Schrodinger ZHU Yifan via cfe-commits
SchrodingerZhu wrote: Does https://mlir.llvm.org/docs/Dialects/Builtin/#fusedloc suit the situation? On Thu, Oct 31, 2024 at 15:48, David Olsen ***@***.***> wrote: @dkolsen-pgi commented on this pull request. In clang/lib/CIR/CodeGen/CIRGenModule.cpp: > @@ -24,9 +27,140 @@ CIRGenModule::CI

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
@@ -779,23 +795,16 @@ static StringRef makeAbsoluteAndPreferred(CompilerInstance &CI, StringRef Path, void ModuleDepCollector::addFileDep(StringRef Path) { if (IsStdModuleP1689Format) { // Within P1689 format, we don't want all the paths to be absolute path -// since

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -455,6 +455,174 @@ The SYCL kernel in the previous code sample meets these expectations. }]; } +def SYCLKernelEntryPointDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +The ``sycl_kernel_entry_point`` attribute facilitates the generation of a

[clang] [clang][lex] Remove `-index-header-map` (PR #114459)

2024-10-31 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 3452149c059010e834050acd41a64595eb74df11 57c87b5326ebe557fc8830d4a558bd6fabf907fb --e

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

2024-10-31 Thread Chris B via cfe-commits
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder { return Builder; } }; + +// Builder for methods of builtin types. Allows adding methods to builtin types +// using the builder pattern like this: +// +// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName

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

2024-10-31 Thread Peilin Ye via cfe-commits
https://github.com/peilin-ye updated https://github.com/llvm/llvm-project/pull/108636 >From 885d5141f6707a0fdf4be363351083f8fdf8fd54 Mon Sep 17 00:00:00 2001 From: Peilin Ye Date: Sat, 5 Oct 2024 06:44:21 + Subject: [PATCH 1/3] [BPF] Rename isST*() and isLD*() functions in BPFMISimplifyPat

[clang] [clang-tools-extra] [clang][lex] Remove `HeaderFileInfo::Framework` (PR #114460)

2024-10-31 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/114460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > We do not want or need a new pass to handle this. This is not a fix to the > structural issue of wavesize. The problem is there is no such thing as a "no > wavesize" IR. There is only wave32 or wave64. Querying the target gives the > wrong answer for faux "generic" IR. Throwin

[clang] [clang][driver] Improve warning message for target AVR (PR #114394)

2024-10-31 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/114394 >From eb74d413d2f5e5dcc520282a5c59893d5bf5 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Thu, 31 Oct 2024 20:06:55 +0800 Subject: [PATCH] [clang][driver] Improve warning message for AVR when no '-mmcu' opt

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-31 Thread Hubert Tong via cfe-commits
https://github.com/hubert-reinterpretcast commented: Needs tests for rounding cases and observance of rounding modes. https://github.com/llvm/llvm-project/pull/113020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Faux "generic" IR sounds like a problematic concept, do you have an example? It's what `libc` and the ROCm DeviceLibs do, compile without `-mcpu` and don't use any target specific attributes or intrinsics, then link it into a TU later when the target is known. It's find in pri

[clang] da97883 - [clang][driver] Improve warning message for target AVR (#114394)

2024-10-31 Thread via cfe-commits
Author: Ben Shi Date: 2024-11-01T08:51:24+08:00 New Revision: da9788359d35f4294bc6ec5323751e40981cdbe0 URL: https://github.com/llvm/llvm-project/commit/da9788359d35f4294bc6ec5323751e40981cdbe0 DIFF: https://github.com/llvm/llvm-project/commit/da9788359d35f4294bc6ec5323751e40981cdbe0.diff LOG:

[clang] [clang] constexpr built-in fma function. (PR #113020)

2024-10-31 Thread Hubert Tong via cfe-commits
hubert-reinterpretcast wrote: A problem with the current patch is that it does not evaluate, even in constant expression contexts, cases that require rounding: ```cpp extern constexpr float onepluszeroeps = __builtin_fmaf(__FLT_EPSILON__, .0f, 1.f); extern constexpr float oneplushalfeps = __bui

[clang] [clang][driver] Improve warning message for target AVR (PR #114394)

2024-10-31 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/114394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > Just adding this to the pass pipeline where it is is no better than just > doing it in instcombine, which is the natural place to do this. This patch, > like instcombine, still has the problem that we don't know if we're producing > the final code. We could just turn this off

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
AlexVlx wrote: > > Faux "generic" IR sounds like a problematic concept, do you have an example? > > It's what `libc` and the ROCm DeviceLibs do, compile or IR without `-mcpu` > and don't use any target specific attributes or intrinsics, then link it into > a TU later when the target is known.

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #113730)

2024-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! Please remove the whitespace-only change in clang/include/clang/AST/Type.h. https://github.com/llvm/llvm-project/pull/113730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,49 @@ +//===- AMDGPUExpandPseudoIntrinsics.cpp - Pseudo Intrinsic Expander Pass --===// +// +// 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: Apa

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/2] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > As per my other reply, this is not an invalid use case, but somewhat niche. > We can have a control value for disabling this early fold, for such builds, > to avoid the need to do two builds (which might also be fine for `libc`). I > don't think ROCDL uses the intrinsic at all

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
@@ -0,0 +1,49 @@ +//===- AMDGPUExpandPseudoIntrinsics.cpp - Pseudo Intrinsic Expander Pass --===// +// +// 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: Apa

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-10-31 Thread Steven Perron via cfe-commits
@@ -0,0 +1,48 @@ +; RUN: llc -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - | FileCheck %s +; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32v1.3-vulkan-unknown %s -o - -filetype=obj | spirv-val %} s-perron wrote: You should be using `spirv`. You probably need

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -10,4 +10,57 @@ // //===--===// -#include +#include "clang/CIR/Dialect/IR/CIRDialect.h" + +#include "mlir/Support/LogicalResult.h" + +#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-10-31 Thread Tom Honermann via cfe-commits
@@ -12053,6 +12053,10 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, if (LangOpts.OpenMP) OpenMP().ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(NewFD); + if (LangOpts.isSYCL() && NewFD->hasAttr() && + !NewFD->isInvalidDecl() && !NewFD-

[clang] [clang] SemaFunctionEffects: When verifying a function, ignore any trailing 'requires' clause. (PR #114266)

2024-10-31 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > Also, @dougsonos, can you make a godbolt link for this? I’m trying to > reproduce it, but compiling the code you provided doesn’t result in any > diagnostics for me, but I might be missing a flag. Yeah, I can't repro in godbolt either. This shows that all the effect analysis

[clang] [llvm] Introduce a new WebKit checker for a unchecked local variable (PR #113708)

2024-10-31 Thread Rashmi Mudduluru via cfe-commits
@@ -0,0 +1,342 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.UncheckedLocalVarsChecker -verify %s + +#include "mock-types.h" +#include "mock-system-header.h" + +void someFunction(); + +namespace raw_ptr { +void foo() { + CheckedObj *bar; + // FIXME: later on we

[clang] Hexagon builtins (PR #114412)

2024-10-31 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114412.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/InterpBuiltin.cpp (+8-5) - (m

[clang] [clang][bytecode] Implement IntegralAP bitcasting (PR #114471)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Only for full-byte bitwidths for now. --- Full diff: https://github.com/llvm/llvm-project/pull/114471.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/IntegralAP.h (+6-2) - (modified) clang/test

[clang] [flang] [clang] Add option to specify opt pipeline during offload lto (PR #114401)

2024-10-31 Thread via cfe-commits
macurtis-amd wrote: For the purposes of experimentation, `-Xoffload-linker` is sufficient that this change is not necessary. https://github.com/llvm/llvm-project/pull/114401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-10-31 Thread Joshua Batista via cfe-commits
@@ -483,10 +582,101 @@ static BuiltinTypeDeclBuilder setupBufferType(CXXRecordDecl *Decl, Sema &S, .addDefaultHandleConstructor(S, RC); } +BinaryOperator *constructSizeOfLEQ16Expr(ASTContext &Context, + SourceLocation NameLoc, +

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

2024-10-31 Thread Peilin Ye via cfe-commits
peilin-ye wrote: Pushed v9: - Rewrote `acquire-release.ll` to make it also test `__ATOMIC_RELAXED` (renamed to `atomic-load-store.ll`, just like e.g. `llvm/test/CodeGen/X86/atomic-load-store.ll`) - Style change as suggested by Matt https://github.com/llvm/llvm-project/pull/108636 ___

[clang] [flang] [clang] Add option to specify opt pipeline during offload lto (PR #114401)

2024-10-31 Thread via cfe-commits
https://github.com/macurtis-amd closed https://github.com/llvm/llvm-project/pull/114401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Implement IntegralAP bitcasting (PR #114471)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114471 Only for full-byte bitwidths for now. >From 6543ec71a9e5692c1142a1a4c3da5843accee756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 23:14:41 +0100 Subject: [PATCH] [clang][

[clang] [flang] [clang] Add option to specify opt pipeline during offload lto (PR #114401)

2024-10-31 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > For the purposes of experimentation, `-Xoffload-linker` is sufficient that > this change is not necessary. Also worth noting that `-Xoffload-linker-amdgcn-amd-amdhsa` should work if you just want to target a single toolchain. https://github.com/llvm/llvm-project/pull/114401 _

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,192 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -123,10 +123,16 @@ New checks Gives warnings for tagged unions, where the number of tags is different from the number of data members inside the union. +- New :doc:`modernize-use-integer-sign-comparison + ` check. + + Replace comparisons between signed and unsigned in

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-10-31 Thread via cfe-commits
@@ -5743,6 +5747,14 @@ LoongArchTargetLowering::shouldExpandAtomicRMWInIR(AtomicRMWInst *AI) const { } unsigned Size = AI->getType()->getPrimitiveSizeInBits(); + if (Subtarget.hasLAMCAS()) { +if (AI->getOperation() == AtomicRMWInst::Nand || +(Size < 32 /*&& (

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/3] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-10-31 Thread via cfe-commits
@@ -1562,7 +1562,9 @@ unsigned LoongArchAsmParser::checkTargetMatchPredicate(MCInst &Inst) { unsigned Opc = Inst.getOpcode(); switch (Opc) { default: -if (Opc >= LoongArch::AMADD_D && Opc <= LoongArch::AMXOR_W) { +// amcas[_db].{b/h/w/d} didn't need this judgemen

[clang-tools-extra] [clang-tidy] Create a check for signed and unsigned integers comparison (PR #113144)

2024-10-31 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,192 @@ +//===--- UseIntegerSignComparisonCheck.cpp - clang-tidy ---===// +// +// 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][Driver] Allow -fuse-lld=lld-link when lto is enabled on *windows-msvc targets (PR #113966)

2024-10-31 Thread Max Winkler via cfe-commits
https://github.com/MaxEW707 approved this pull request. LGTM! Would like a final look over from @MaskRay before merging :). https://github.com/llvm/llvm-project/pull/113966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/114457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/114457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/4] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

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

2024-10-31 Thread Helena Kotas via cfe-commits
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder { return Builder; } }; + +// Builder for methods of builtin types. Allows adding methods to builtin types +// using the builder pattern like this: +// +// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Matt Arsenault via cfe-commits
arsenm wrote: Mechanically, this pass can be replaced with trivial handling of the intrinsic in AMDGPUInstCombineIntrinsic; we don't need a new module pass. As inserted into the pipeline here, this does not have any advantage over handling it directly in instcombine. > We could just turn this

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-10-31 Thread Yusuke MINATO via cfe-commits
yus3710-fj wrote: I confirmed the performance regression on both Graviton3 and Grace when the value of `copies` is set to 1. The result of the measurement on Graviton3: ||max|min|avg| |---|---|---|---| |before this patch|52.56|52.44|52.518| |after this patch|48.90 (-7.48%)|48.79 (-7.48%)|48.86

[clang] [Clang] prevent assertion failure from an invalid template instantiation pattern when adding instantiated params to the scope in friend functions with defaulted params (PR #113777)

2024-10-31 Thread Younan Zhang via cfe-commits
@@ -3437,10 +3437,10 @@ bool Sema::SubstDefaultArgument( // template void f(T a, int = decltype(a)()); // void g() { f(0); } LIS = std::make_unique(*this); - FunctionDecl *PatternFD = FD->getTemplateInstantiationPattern( - /*ForDefinition*/ f

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -16,4 +16,87 @@ include "clang/CIR/Dialect/IR/CIRDialect.td" +include "mlir/Interfaces/ControlFlowInterfaces.td" +include "mlir/Interfaces/FunctionInterfaces.td" +include "mlir/Interfaces/InferTypeOpInterface.td" +include "mlir/Interfaces/LoopLikeInterface.td" +include "ml

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [clang][bytecode] Implement IntegralAP bitcasting (PR #114471)

2024-10-31 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/114471 >From dcc03dcb4f1fed9fe871c904738a4f49c0716cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 31 Oct 2024 23:14:41 +0100 Subject: [PATCH] [clang][bytecode] Implement IntegralAP bitcasti

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

2024-10-31 Thread Helena Kotas via cfe-commits
https://github.com/hekota 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] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm requested changes to this pull request. We do not want or need a new pass to handle this. This is not a fix to the structural issue of wavesize. The problem is there is no such thing as a "no wavesize" IR. There is only wave32 or wave64. Querying the target gives the

[clang] [clang-format] Add ConfigFile option (PR #113864)

2024-10-31 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/113864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [opt][AMDGPU] Add pass to handle AMDGCN pseudo-intrinsics target specific info), start with `llvm.amdgcn.wavefrontsize` (PR #114481)

2024-10-31 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 cf3464bbb796d492bcd4e764ada945304e0c874f 137659649078fe978fb9d7d262df9b7a512d2770 --e

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114485.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.h (+2-1) - (modified) clang/test/AST/ByteCode/builtin-bit-cast.cpp (+55-1

<    1   2   3   4   5   6   >