[clang] [Clang][Sema]: Allow flexible arrays in unions and alone in structs (PR #84428)

2024-03-12 Thread Kees Cook via cfe-commits
kees wrote: > That one ends up not being a problem, but presumably you are wanting to > change that top-level 'struct' to be a 'union'? No, I want to collapse the entire macro into just `TYPE NAME[]`. Right now the Linux kernel uses the `DECLARE_FLEX_ARRAY` macro _in_ over 200 unions and stru

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 Thread via cfe-commits
yonghong-song wrote: @efriedma-quic Thanks for your comments. BPF llvm backend and kernel BPF jit try to make BPF<->other_architecture compatible. riscv started to support BPF starting in 2020 and probably BPF has limited usage so the bug is exposed until now. Yes, BPFTargetLowering::LowerCall

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-12 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/84410 >From 1cb6905e726b1f6c6cb71ea1e4d9ab4405aedeaf Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH] [BPF] Add addr_space_cast BPF instruction addr_space_cast ins

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -6488,6 +6488,9 @@ defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", PosFlag, NegFlag>; + +def fcuda : Flag<["-"], "fcuda">, Group, clementval wro

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval edited https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
@@ -0,0 +1,13 @@ +! Test -fcuda option +! RUN: %flang -fc1 -cpp -fcuda -fdebug-unparse %s -o - | FileCheck %s clementval wrote: Without it, it would just fail during parsing. Do you want a test that check the failure? https://github.com/llvm/llvm-project/pull/8

[clang] [clang] Better bitfield access units (PR #65742)

2024-03-12 Thread Nathan Sidwell via cfe-commits
urnathan wrote: @rjmccall here's a refactoring along the lines you suggested. Once one stops worrying about rescanning when the next access unit fails to accumulate into the current one, things get simpler. The compiler should be able to turn the boolean conditional flow within the loop body i

[clang] [InstallAPI] Break up headers and add common header for TextAPI types (PR #84960)

2024-03-12 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/84960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a38b7a4 - [InstallAPI] Break up headers and add common header for TextAPI types (#84960)

2024-03-12 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-03-12T12:37:17-07:00 New Revision: a38b7a432d3cbb093af9310eba5b4982dc0a0243 URL: https://github.com/llvm/llvm-project/commit/a38b7a432d3cbb093af9310eba5b4982dc0a0243 DIFF: https://github.com/llvm/llvm-project/commit/a38b7a432d3cbb093af9310eba5b4982dc0a0243.diff

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-12 Thread via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86 + +// Check that for 'F _Complex + int' (F = real floating-point type), we emit an +// implicit cast from 'int' to 'F', but NOT to 'F _Complex' (i.e. that

[clang] [InstallAPI] Break up headers and add common header for TextAPI types (PR #84960)

2024-03-12 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Fix bug in `_Complex float`+`int` arithmetic (PR #83063)

2024-03-12 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,143 @@ +// RUN: %clang_cc1 %s -O0 -emit-llvm -triple x86_64-unknown-unknown -o - | FileCheck %s --check-prefix=X86 + +// Check that for 'F _Complex + int' (F = real floating-point type), we emit an +// implicit cast from 'int' to 'F', but NOT to 'F _Complex' (i.e. that

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-12 Thread via cfe-commits
@@ -0,0 +1,52 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 +; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s + +; Generated from the following C code: +; +; extern int __uptr *magic1(); +; ex

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-12 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/84410 >From 503c1abc8dd63ec1500d1ed867a4bfefc1aed062 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Fri, 26 Jan 2024 04:18:32 +0200 Subject: [PATCH 1/4] [BPF] Add addr_space_cast BPF instruction This commit aim

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Andrzej Warzyński via cfe-commits
@@ -0,0 +1,13 @@ +! Test -fcuda option +! RUN: %flang -fc1 -cpp -fcuda -fdebug-unparse %s -o - | FileCheck %s banach-space wrote: Could you add a RUN line without enabling CUDA? Otherwise it's hard to see what's being tested and what the impact of enabling CUDA

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Andrzej Warzyński via cfe-commits
@@ -6488,6 +6488,9 @@ defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", PosFlag, NegFlag>; + +def fcuda : Flag<["-"], "fcuda">, Group, banach-space w

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Made by following: https://github.com/llvm/llvm-project/pull/83585#issuecomment-1980340866 Thanks for the details Tomek! --- Full diff: https://github.com/llvm/llvm-project/pull/84972.dif

[clang] [analyzer] Support C++23 static operator calls (PR #84972)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/84972 Made by following: https://github.com/llvm/llvm-project/pull/83585#issuecomment-1980340866 Thanks for the details Tomek! >From 9860dad609c8a27dfaa178af5b72285e3ad050fd Mon Sep 17 00:00:00 2001 From: Balazs Beni

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From f22a5cd30f77b2043f9c1f7f4482fad87fb79250 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/5] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instru

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/83896 >From 9434f834c4d48559aeec94403c927f48b15763e3 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 4 Mar 2024 11:24:34 -0800 Subject: [PATCH 1/5] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instru

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-12 Thread Piotr Zegar via cfe-commits
@@ -165,20 +165,20 @@ void UnusedReturnValueCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { void UnusedReturnValueCheck::registerMatchers(MatchFinder *Finder) { auto MatchedDirectCallExpr = expr( - callExpr( - callee(functionDecl( - // Do

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-12 Thread Piotr Zegar via cfe-commits
@@ -165,20 +165,20 @@ void UnusedReturnValueCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) { void UnusedReturnValueCheck::registerMatchers(MatchFinder *Finder) { auto MatchedDirectCallExpr = expr( - callExpr( - callee(functionDecl( - // Do

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Overall change is fine. There is only one usage of isOperatorOverloading, so you could consider changing this into: isOverloadAssigmentOperator and put all those operator kinds in a matcher instead of messing with SmallVector. https://git

[clang-tools-extra] [clang-tidy]bugprone-unused-return-value ignore `++` and `--` operator overloading (PR #84922)

2024-03-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/84922 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 Thread via cfe-commits
https://github.com/yonghong-song updated https://github.com/llvm/llvm-project/pull/84874 >From 2f0bb4f039d9b0ceb8e014b85c68050b65726d3d Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Mon, 11 Mar 2024 22:27:37 -0700 Subject: [PATCH] [Clang][BPF] Allow sign/zero extension for call parameters

[clang] [llvm] [RISCV] Add back SiFive's cdiscard.d.l1 and cflush.d.l1 instructions. (PR #83896)

2024-03-12 Thread Craig Topper via cfe-commits
topperc wrote: > > > Hi @topperc, can you add instruction alias for cflush and cdiscard > > > instructions when the rs1 is X0 to `sf.cflush.d.l1` and `sf.cflush.d.l1` > > > respectively, as this register is optional according to spec? > > > > > > x0 has special meaning, but the spec never say

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 Thread via cfe-commits
https://github.com/yonghong-song edited https://github.com/llvm/llvm-project/pull/84874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 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 c4e517f59c086eafe2eb61d23197820f05be799c e2a62512b1693d06dc3421d93de17fc248a6a496 --

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 Thread via cfe-commits
https://github.com/yonghong-song edited https://github.com/llvm/llvm-project/pull/84874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][BPF] Allow sign extension for int type call parameters (PR #84874)

2024-03-12 Thread via cfe-commits
https://github.com/yonghong-song updated https://github.com/llvm/llvm-project/pull/84874 >From e2a62512b1693d06dc3421d93de17fc248a6a496 Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Mon, 11 Mar 2024 22:27:37 -0700 Subject: [PATCH] [Clang][BPF] Allow sign/zero extension for call parameters

[clang] [llvm] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX (PR #67999)

2024-03-12 Thread Zaara Syeda via cfe-commits
https://github.com/syzaara updated https://github.com/llvm/llvm-project/pull/67999 >From d7536fb557b254454b9944c4bef4d552e117190a Mon Sep 17 00:00:00 2001 From: Zaara Syeda Date: Thu, 28 Sep 2023 15:01:56 -0400 Subject: [PATCH 1/9] [AIX][TOC] Add -mtocdata/-mno-tocdata options on AIX This patc

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/84963 >From a88c479c8c1141af65887829e27194b2715ebfb2 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Tue, 12 Mar 2024 18:24:26 +0100 Subject: [PATCH 1/3] Reapply "[analyzer] Accept C library functions from the `st

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-12 Thread Richard Smith via cfe-commits
@@ -26996,18 +26996,38 @@ class, structure, array, or other object. Arguments: "" -The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0

[libcxx] [libcxxabi] [libunwind] [libcxx, libcxxabi, libunwind] Prefer -fvisibility-global-new-delete=force-hidden (PR #84917)

2024-03-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/84917 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/84934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Farzon Lotfi via cfe-commits
@@ -5254,7 +5250,11 @@ bool CheckAllArgsHaveFloatRepresentation(Sema *S, CallExpr *TheCall) { QualType ExpectedType = S->Context.FloatTy; for (unsigned i = 0; i < TheCall->getNumArgs(); ++i) { QualType PassedType = TheCall->getArg(i)->getType(); -if (!PassedType->h

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-03-12 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/84934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

2024-03-12 Thread Eli Friedman via cfe-commits
@@ -5571,11 +5571,52 @@ LValue CodeGenFunction::EmitBinaryOperatorLValue(const BinaryOperator *E) { break; } -RValue RV = EmitAnyExpr(E->getRHS()); +llvm::Value *Previous = nullptr; efriedma-quic wrote: Sure, if you want to leave the larger

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-12 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 c1af6ab505a83bfb4fc8752591ad333190bc9389 ca45c672e32372d0144720f2ee47d5a5c132ced0 --

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-12 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,NagyDonat Message-ID: In-Reply-To: steakhal wrote: I proposed the PR #84963 for relanding this, including the fix for the use-after-free of the AST of the unittest. https://github.com/llvm/llvm-project/pull/84469 __

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes Relands PR #84926, after resolving use-after-free of the AST of the unittest xD Pretty silly bug, I must admit. --- Full diff: https://github.com/llvm/llvm-project/pull/84963.diff 5 Fil

[clang] [llvm] [Clang][BPF] Allow sign extension for int type call parameters (PR #84874)

2024-03-12 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: The way LLVM backend works in general is that if an integer is smaller than a register, when type legalization converts that to a larger integer, the high bits are undefined. This generally doesn't cause any issues because nothing can actually observe those bits. Your an

[clang] [llvm] Reapply "[analyzer] Accept C library functions from the `std` namespace" (#84926) (PR #84963)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/84963 Relands PR #84926, after resolving use-after-free of the AST of the unittest xD Pretty silly bug, I must admit. >From a88c479c8c1141af65887829e27194b2715ebfb2 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date:

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-12 Thread Bill Wendling via cfe-commits
@@ -26996,18 +26996,38 @@ class, structure, array, or other object. Arguments: "" -The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0

[clang] [clang][CodeCompletion] Allow debuggers to code-complete reserved identifiers (PR #84891)

2024-03-12 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/84891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,187 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// 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] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,187 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// 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] [InstallAPI] Break up headers and add common header for TextAPI types (PR #84960)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Cyndy Ishida (cyndyishida) Changes Before it gets too unwieldy, add a common header for all MachO types that are used across InstallAPI. Also, break up the types in `InstallAPI/Frontend`. This both avoids circular dependencies and is logi

[clang] [InstallAPI] Break up headers and add common header for TextAPI types (PR #84960)

2024-03-12 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida created https://github.com/llvm/llvm-project/pull/84960 Before it gets too unwieldy, add a common header for all MachO types that are used across InstallAPI. Also, break up the types in `InstallAPI/Frontend`. This both avoids circular dependencies and is logicall

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #83204)

2024-03-12 Thread Richard Smith via cfe-commits
@@ -26996,18 +26996,38 @@ class, structure, array, or other object. Arguments: "" -The ``llvm.objectsize`` intrinsic takes four arguments. The first argument is a -pointer to or into the ``object``. The second argument determines whether -``llvm.objectsize`` returns 0

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-12 Thread Ian Anderson via cfe-commits
@@ -7,6 +7,11 @@ *===---=== */ -#ifndef offsetof +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(offsetof

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-12 Thread Balazs Benics via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,NagyDonat Message-ID: In-Reply-To: steakhal wrote: Thanks! Indeed, it looks like valgrind also complains: ``` [ RUN ] IsCLibraryFunctionTest.AcceptsGlobal ==999215== Invalid read of size 1 ==999215==at 0x15420D0: hasAttr

[clang] [llvm] [Clang][BPF] Allow sign extension for int type call parameters (PR #84874)

2024-03-12 Thread via cfe-commits
@@ -22,6 +22,19 @@ class BPFABIInfo : public DefaultABIInfo { public: BPFABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {} + bool isPromotableIntegerTypeForABI(QualType Ty) const { +if (ABIInfo::isPromotableIntegerTypeForABI(Ty) == true) + return true; + +if

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-03-12 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 closed https://github.com/llvm/llvm-project/pull/79035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c4e517f - [AMDGPU] Adding the amdgpu_num_work_groups function attribute (#79035)

2024-03-12 Thread via cfe-commits
Author: Jun Wang Date: 2024-03-12T10:30:39-07:00 New Revision: c4e517f59c086eafe2eb61d23197820f05be799c URL: https://github.com/llvm/llvm-project/commit/c4e517f59c086eafe2eb61d23197820f05be799c DIFF: https://github.com/llvm/llvm-project/commit/c4e517f59c086eafe2eb61d23197820f05be799c.diff LOG:

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-12 Thread via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: 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 co

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

2024-03-12 Thread Akash Banerjee via cfe-commits
TIFitis wrote: @jsjodin @jdoerfert I have now added the missing support for complex variable reductions. Please let me know if this patch requires any other changes. Thanks. https://github.com/llvm/llvm-project/pull/80343 ___ cfe-commits mailing list

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,187 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// 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] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,133 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for any are generated for float and half. + + +target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" +target triple = "

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,133 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for any are generated for float and half. + + +target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" +target triple = "

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,133 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for any are generated for float and half. + + +target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" +target triple = "

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,187 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// 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] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,133 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for any are generated for float and half. + + +target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64" +target triple = "

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,187 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// 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] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,187 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// 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] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,187 @@ +//===- DXILIntrinsicExpansion.cpp - Prepare LLVM Module for DXIL encoding--===// +// +// 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] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -5254,7 +5250,11 @@ bool CheckAllArgsHaveFloatRepresentation(Sema *S, CallExpr *TheCall) { QualType ExpectedType = S->Context.FloatTy; for (unsigned i = 0; i < TheCall->getNumArgs(); ++i) { QualType PassedType = TheCall->getArg(i)->getType(); -if (!PassedType->h

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Justin Bogner via cfe-commits
@@ -18015,38 +18015,11 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *X = EmitScalarExpr(E->getArg(0)); Value *Y = EmitScalarExpr(E->getArg(1)); Value *S = EmitScalarExpr(E->getArg(2)); -llvm::Type *Xty = X->getType(); -llvm::Type

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-12 Thread Nathan Gauër via cfe-commits
@@ -1297,5 +1297,10 @@ _HLSL_AVAILABILITY(shadermodel, 6.0) _HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_count_bits) uint WaveActiveCountBits(bool Val); +/// \brief Returns the index of the current lane within the current wave. +_HLSL_AVAILABILITY(shadermodel, 6.0) +_HLSL_BU

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-12 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts updated https://github.com/llvm/llvm-project/pull/80680 From 818ccfd0258602fdd0630823bb2b8af0507749d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nathan=20Gau=C3=ABr?= Date: Fri, 2 Feb 2024 16:38:46 +0100 Subject: [PATCH 1/5] [clang][HLSL][SPRI-V] Add convergence intrins

[clang] [analyzer][NFC] Turn NodeBuilderContext into a class (PR #84638)

2024-03-12 Thread via cfe-commits
github-actions[bot] wrote: @diego-est Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a buil

[clang] [analyzer][NFC] Turn NodeBuilderContext into a class (PR #84638)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/84638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 7bee91f - [analyzer][NFC] Turn NodeBuilderContext into a class (#84638)

2024-03-12 Thread via cfe-commits
Author: Diego A. Estrada Rivera Date: 2024-03-12T18:21:31+01:00 New Revision: 7bee91fadf8db90f71b458aaff4de0efa7dc23a0 URL: https://github.com/llvm/llvm-project/commit/7bee91fadf8db90f71b458aaff4de0efa7dc23a0 DIFF: https://github.com/llvm/llvm-project/commit/7bee91fadf8db90f71b458aaff4de0efa7dc

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-12 Thread Nathan Gauër via cfe-commits
@@ -4554,6 +4554,13 @@ def HLSLWaveActiveCountBits : LangBuiltin<"HLSL_LANG"> { let Prototype = "unsigned int(bool)"; } +// HLSL +def HLSLWaveGetLaneIndex : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_wave_get_lane_index"]; + let Attributes = [NoThrow, Co

[clang] [clang][modules] giving the __stddef_ headers their own modules can cause redeclaration errors with -fbuiltin-headers-in-system-modules (PR #84127)

2024-03-12 Thread Volodymyr Sapsai via cfe-commits
@@ -7,6 +7,11 @@ *===---=== */ -#ifndef offsetof +/* + * When -fbuiltin-headers-in-system-modules is set this is a non-modular header + * and needs to behave as if it was textual. + */ +#if !defined(offsetof

[clang] [llvm] [analyzer] Accept C library functions from the `std` namespace (PR #84469)

2024-03-12 Thread via cfe-commits
=?utf-8?q?Donát?= Nagy , =?utf-8?q?Donát?= Nagy ,Balazs Benics ,NagyDonat Message-ID: In-Reply-To: NagyDonat wrote: @steakhal It seems that the unit tests that you suggested fail on many different buildbots: - https://lab.llvm.org/buildbot/#/builders/86/builds/76040 - https://lab.llvm.org/bu

[clang] [analyzer][NFC] Turn NodeBuilderContext into a class (PR #84638)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/84638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread via cfe-commits
https://github.com/jeanPerier approved this pull request. https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][BPF] Allow sign extension for int type call parameters (PR #84874)

2024-03-12 Thread via cfe-commits
@@ -22,6 +22,19 @@ class BPFABIInfo : public DefaultABIInfo { public: BPFABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {} + bool isPromotableIntegerTypeForABI(QualType Ty) const { +if (ABIInfo::isPromotableIntegerTypeForABI(Ty) == true) + return true; + +if

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

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

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Slava Zakharin via cfe-commits
@@ -6488,6 +6488,9 @@ defm stack_arrays : BoolOptionWithoutMarshalling<"f", "stack-arrays", defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stride", PosFlag, NegFlag>; + +def fcuda : Flag<["-"], "fcuda">, Group, vzakhari wrote

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari edited https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/84944 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclc] [llvm] [openmp] [Clang] `__attribute__((assume))` refactor (PR #84934)

2024-03-12 Thread via cfe-commits
Sirraide wrote: > Hi @Sirraide : I appreciate the patch! However, I'm not particularly likely > to get a chance to take a look before I go to the WG21 meeting next week, so > I'll likely need to review this in April when I get back. I just wanted to > mention that so you don't think I'm ignori

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-flang-driver Author: Valentin Clement (バレンタイン クレメン) (clementval) Changes Flang driver was already able to enable the CUDA language feature base on the file extension but there was no command line option. This PR adds one. --

[clang] [flang] [flang][cuda] Add -fcuda option (PR #84944)

2024-03-12 Thread Valentin Clement バレンタイン クレメン via cfe-commits
https://github.com/clementval created https://github.com/llvm/llvm-project/pull/84944 Flang driver was already able to enable the CUDA language feature base on the file extension but there was no command line option. This PR adds one. >From e42e8fe7f1dfe503a6735ef76e9d6483f5c9b5ec Mon Sep 17

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/84526 >From 7dde8faaad046b715027a0f9fb772af90b6ffb30 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 7 Mar 2024 20:48:46 -0500 Subject: [PATCH 1/3] [DXIL] exp, any, lerp, & rcp Intrinsic Lowering This change im

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl updated https://github.com/llvm/llvm-project/pull/84526 >From 7dde8faaad046b715027a0f9fb772af90b6ffb30 Mon Sep 17 00:00:00 2001 From: Farzon Lotfi Date: Thu, 7 Mar 2024 20:48:46 -0500 Subject: [PATCH 1/3] [DXIL] exp, any, lerp, & rcp Intrinsic Lowering This change im

[clang] [clang][ASTMatchers] Fix forEachArgumentWithParam* for deducing "this" operator calls (PR #84887)

2024-03-12 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/84887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fe8cf2f - [clang][ASTMatchers] Fix forEachArgumentWithParam* for deducing "this" operator calls (#84887)

2024-03-12 Thread via cfe-commits
Author: Balazs Benics Date: 2024-03-12T17:31:22+01:00 New Revision: fe8cf2fc9090d3d56fa1a6bb4b70bd38277874eb URL: https://github.com/llvm/llvm-project/commit/fe8cf2fc9090d3d56fa1a6bb4b70bd38277874eb DIFF: https://github.com/llvm/llvm-project/commit/fe8cf2fc9090d3d56fa1a6bb4b70bd38277874eb.diff

[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-12 Thread Louis Dionne via cfe-commits
https://github.com/ldionne approved this pull request. https://github.com/llvm/llvm-project/pull/83774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [C++20] [Modules] [P1689] [Scanner] Don't use thread pool in P1689 per file mode (PR #84285)

2024-03-12 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/84285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-12 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -4554,6 +4554,13 @@ def HLSLWaveActiveCountBits : LangBuiltin<"HLSL_LANG"> { let Prototype = "unsigned int(bool)"; } +// HLSL +def HLSLWaveGetLaneIndex : LangBuiltin

[clang] [llvm] [clang][HLSL][SPRI-V] Add convergence intrinsics (PR #80680)

2024-03-12 Thread Chris B via cfe-commits
Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= , Nathan =?utf-8?q?Gauër?= Message-ID: In-Reply-To: @@ -1297,5 +1297,10 @@ _HLSL_AVAILABILITY(shadermodel, 6.0) _HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_active_count_bits) uint WaveActiveCountBits(bool Val); +/// \brief Ret

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-12 Thread via cfe-commits
martinboehme wrote: > Per offline discussion, please see if we can be more targeted in our use of > the generalized matching, given the potentially high cost incurred (for every > relevant operation, like comparison, we'll be searching the entire type > hierchy of the arguments). Done! I'm s

[clang] [llvm] [HLSL] Implement `rsqrt` intrinsic (PR #84820)

2024-03-12 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/84820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-12 Thread via cfe-commits
@@ -64,38 +64,53 @@ static bool hasOptionalClassName(const CXXRecordDecl &RD) { return false; } +static const CXXRecordDecl *getOptionalBaseClass(const CXXRecordDecl *RD) { + if (RD == nullptr) +return nullptr; + if (hasOptionalClassName(*RD)) +return RD; + + if (

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-12 Thread via cfe-commits
https://github.com/martinboehme updated https://github.com/llvm/llvm-project/pull/84138 >From 209aac483514f6d041486f36e6dabec78598fcec Mon Sep 17 00:00:00 2001 From: Martin Braenne Date: Tue, 12 Mar 2024 15:56:41 + Subject: [PATCH] [clang][dataflow] Make optional checker work for types der

<    1   2   3   4   5   >