[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-12 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/81239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-12 Thread Gábor Horváth via cfe-commits
@@ -943,6 +919,50 @@ Environment::createLocAndMaybeValue(QualType Ty, return Loc; } +void Environment::initializeFieldsWithValues(RecordStorageLocation , + llvm::DenseSet , + int Depth,

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-12 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/81239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam created https://github.com/llvm/llvm-project/pull/81514 None >From 13fd73932251843173cbbc31ca93905ca0469277 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Mon, 12 Feb 2024 10:58:19 -0800 Subject: [PATCH] [CLANG] Full support of complex multiplication and

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-12 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,701 @@ +//===-- ExpandVariadicsPass.cpp *- 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:

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: I don't really like the whole "sufficiently simple function" thing. It seems fragile. You should be able to just take a arbitrary internal varargs function, rewrite its signature to take a va_list argument, rewrite calls to va_start to make a copy

[clang] [llvm] [transforms] Inline simple variadic functions (PR #81058)

2024-02-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/81058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/81298 >From d59c262b31937fdd2b907ec11d7f08e4a385007c Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Fri, 9 Feb 2024 21:55:03 +0330 Subject: [PATCH 1/3] [clang] Support `__is_trivially_copyable(int()&)==false`

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space approved this pull request. Nice, thank you! https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix behavior of `__is_trivially_relocatable(volatile int)` (PR #77092)

2024-02-12 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/77092 >From ed94371b8e2293642731b72948883c2ec20bd09d Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Wed, 3 Jan 2024 23:23:14 +0330 Subject: [PATCH] [clang] Fix behavior of __is_trivially_relocatable(volatile

[clang] [llvm] [MC/DC] Refactor: Introduce `MCDCTypes.h` for `coverage::mcdc` (PR #81459)

2024-02-12 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81459 >From 03bab9acf5aa3bf13c2223e92dbad040202d34bd Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 12 Feb 2024 18:43:56 +0900 Subject: [PATCH 1/3] [MC/DC] Refactor: Introduce `MCDCTypes.h` for the

[clang] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-02-12 Thread William Junda Huang via cfe-commits
https://github.com/huangjd created https://github.com/llvm/llvm-project/pull/81545 Such expression does not correspond to a variable in the source code thus does not have a debug location. When the user collects perf data on the program, if the intermediate memory load instruction is

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 1xx issues (PR #80338)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80338 >From 9c434c59a1b09a3d1217bbab4e44112a92bf6360 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Thu, 1 Feb 2024 23:44:53 +0300 Subject: [PATCH 1/2] [clang] Add some CodeGen tests for CWG 1xx issues

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/81506 >From 52b239153b2fc4f52e889ad2044daa6ed5cbc836 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Mon, 12 Feb 2024 17:44:38 +0300 Subject: [PATCH 1/3] Initial implementation ---

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Shilei Tian via cfe-commits
@@ -79,17 +79,17 @@ define amdgpu_ps void @test_llvm_amdgcn_fdot2_bf16_bf16_sis( ; GFX11: ; %bb.0: ; %entry ; GFX11-NEXT:v_mov_b32_e32 v2, s1 ; GFX11-NEXT:s_delay_alu instid0(VALU_DEP_1) -; GFX11-NEXT:v_dot2_bf16_bf16 v2, s0, 0x10001, v2 +; GFX11-NEXT:

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

2024-02-12 Thread Jun Wang via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y =

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-12 Thread John McCall via cfe-commits
rjmccall wrote: I talked this over with Mike Ash. I was concerned that Objective-C might allow dynamic class changes that would burn our ability to do this optimization, such as adding ivars during `+initialize`. The existing optimization would work even with a relatively lax runtime as

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B edited https://github.com/llvm/llvm-project/pull/81331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B commented: LGTM with few nits for general and NVPTX parts. https://github.com/llvm/llvm-project/pull/81331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
@@ -2764,6 +2764,37 @@ Query for this feature with ``__has_builtin(__builtin_readcyclecounter)``. Note that even if present, its use may depend on run-time privilege or other OS controlled state. +``__builtin_readsteadycounter`` +-- +

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Artem Belevich via cfe-commits
@@ -104,6 +104,7 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const { case ISD::ATOMIC_STORE: return "AtomicStore"; case ISD::PCMARKER: return "PCMarker"; case ISD::READCYCLECOUNTER: return "ReadCycleCounter";

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81527 >From 7596e70e7ed63d881d4754f3f18b9e01f38f176f Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 12 Feb 2024 12:31:37 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @aeubanks Thank you reporting! I'll take a look momentarily https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove #undef alloca (PR #81534)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arthur Eubanks (aeubanks) Changes Added in 26670dcba1609574cba5942aff78ff97b567c5f3. --- Full diff: https://github.com/llvm/llvm-project/pull/81534.diff 1 Files Affected: - (modified) clang/include/clang/Basic/Builtins.h (-4)

[clang] 5fdd094 - [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (#73176)

2024-02-12 Thread via cfe-commits
Author: Logikable Date: 2024-02-12T09:33:09-08:00 New Revision: 5fdd094837c6d8437803ebf3ccc91c3d494a2ac8 URL: https://github.com/llvm/llvm-project/commit/5fdd094837c6d8437803ebf3ccc91c3d494a2ac8 DIFF: https://github.com/llvm/llvm-project/commit/5fdd094837c6d8437803ebf3ccc91c3d494a2ac8.diff

[clang] [clang][CodeGen] Emit atomic IR in place of optimized libcalls. (PR #73176)

2024-02-12 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/73176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/81398 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I'll send out a PR to remove that code, and potentially also remove the `#undef alloca` separately https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,43 @@ +//===--- DesignatedInitializers.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:

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
@@ -0,0 +1,115 @@ +// RUN: %check_clang_tidy -std=c++17 %s modernize-use-designated-initializers %t +// RUN: %check_clang_tidy -check-suffixes=,SINGLE-ELEMENT -std=c++17 %s modernize-use-designated-initializers %t \ +// RUN: -- -config="{CheckOptions: [{key:

[clang] aef36eb - [clang] Remove old Linux kernel workaround for ensuring stack space (#81533)

2024-02-12 Thread via cfe-commits
Author: Arthur Eubanks Date: 2024-02-12T13:41:58-08:00 New Revision: aef36ebb3b74c81589885c61b4fc066052dd9498 URL: https://github.com/llvm/llvm-project/commit/aef36ebb3b74c81589885c61b4fc066052dd9498 DIFF:

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/81533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: Formatting suggestions to `ParseDeclCXX.cpp` are too disruptive. I'm not going to commit them. https://github.com/llvm/llvm-project/pull/81506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

2024-02-12 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 approved this pull request. I don't know if anyone else has any preference around the additional mcdc-specific header files, but generally it looks good to me. https://github.com/llvm/llvm-project/pull/81497 ___

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Stanislav Mekhanoshin via cfe-commits
@@ -79,17 +79,17 @@ define amdgpu_ps void @test_llvm_amdgcn_fdot2_bf16_bf16_sis( ; GFX11: ; %bb.0: ; %entry ; GFX11-NEXT:v_mov_b32_e32 v2, s1 ; GFX11-NEXT:s_delay_alu instid0(VALU_DEP_1) -; GFX11-NEXT:v_dot2_bf16_bf16 v2, s0, 0x10001, v2 +; GFX11-NEXT:

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-12 Thread via cfe-commits
AtariDreams wrote: > I talked this over with Mike Ash. I was concerned that Objective-C might > allow dynamic class changes that would burn our ability to do this > optimization, such as adding ivars during `+initialize`. The existing > optimization would work even with a relatively lax

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 73159a9 - [NFC] Refactor fast-math handling for clang driver (#81173)

2024-02-12 Thread via cfe-commits
Author: Andy Kaylor Date: 2024-02-12T12:38:16-08:00 New Revision: 73159a994abcbf82881ee15b0df5cf13c9671f31 URL: https://github.com/llvm/llvm-project/commit/73159a994abcbf82881ee15b0df5cf13c9671f31 DIFF: https://github.com/llvm/llvm-project/commit/73159a994abcbf82881ee15b0df5cf13c9671f31.diff

[clang] [NFC] Refactor fast-math handling for clang driver (PR #81173)

2024-02-12 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/81173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9df7189 - [test] Replace aarch64-*-{eabi, gnueabi} with aarch64

2024-02-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-02-12T15:00:45-08:00 New Revision: 9df71899bd5dbbaf0640c74cc82a6330dc7760cf URL: https://github.com/llvm/llvm-project/commit/9df71899bd5dbbaf0640c74cc82a6330dc7760cf DIFF: https://github.com/llvm/llvm-project/commit/9df71899bd5dbbaf0640c74cc82a6330dc7760cf.diff

[clang] f63da47 - [analyzer] Fix an implicit cast to a base ref counted class generates a false positive. (#80934)

2024-02-12 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-02-12T15:01:16-08:00 New Revision: f63da479ae2f5e0d747430f268ae7b458c02455c URL: https://github.com/llvm/llvm-project/commit/f63da479ae2f5e0d747430f268ae7b458c02455c DIFF: https://github.com/llvm/llvm-project/commit/f63da479ae2f5e0d747430f268ae7b458c02455c.diff

[clang] Fix an implicit cast to a base ref counted class generates a false positive. (PR #80934)

2024-02-12 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/80934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2dbfa84 - [analyzer] Allow default arguments to be evaluated like other arguments. (#80956)

2024-02-12 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2024-02-12T15:01:40-08:00 New Revision: 2dbfa8407e7d2f4293add33b5ead3f2d5fcd04e9 URL: https://github.com/llvm/llvm-project/commit/2dbfa8407e7d2f4293add33b5ead3f2d5fcd04e9 DIFF: https://github.com/llvm/llvm-project/commit/2dbfa8407e7d2f4293add33b5ead3f2d5fcd04e9.diff

[clang] Allow default arguments to be evaluated like other arguments. (PR #80956)

2024-02-12 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/80956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-12 Thread Jun Wang via cfe-commits
@@ -0,0 +1,362 @@ +; RUN: llc -mtriple=amdgcn -mcpu=gfx900 -mattr=+amdgpu-precise-memory-op < %s | FileCheck %s -check-prefixes=GFX9 +; RUN: llc -mtriple=amdgcn -mcpu=gfx90a -mattr=+amdgpu-precise-memory-op < %s | FileCheck %s -check-prefixes=GFX90A +; RUN: llc -mtriple=amdgcn

[clang] fb48fd1 - [Driver, test] Fix hlsl-lang-targets.hlsl after #78655

2024-02-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2024-02-12T10:05:22-08:00 New Revision: fb48fd18c240574841378defacadff34238089bb URL: https://github.com/llvm/llvm-project/commit/fb48fd18c240574841378defacadff34238089bb DIFF: https://github.com/llvm/llvm-project/commit/fb48fd18c240574841378defacadff34238089bb.diff

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/80069 >From a82a60e3af041f50b833d241a284e09a883e849a Mon Sep 17 00:00:00 2001 From: zhijian Date: Tue, 30 Jan 2024 15:13:39 -0500 Subject: [PATCH 1/2] support builtin_cpu_is() for aix ---

[clang] [llvm] [AIX] support builtin_cpu_is() for aix (PR #80069)

2024-02-12 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/80069 >From a82a60e3af041f50b833d241a284e09a883e849a Mon Sep 17 00:00:00 2001 From: zhijian Date: Tue, 30 Jan 2024 15:13:39 -0500 Subject: [PATCH 1/3] support builtin_cpu_is() for aix ---

[clang] [llvm] [RFC][AMDGPU] Use `bf16` instead of `i16` for bfloat (PR #80908)

2024-02-12 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/80908 >From 4196e998349d663a9a9922937cc4bedbec95fe5f Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Mon, 12 Feb 2024 13:48:39 -0500 Subject: [PATCH] [RFC][WIP][AMDGPU] Use `bf16` instead of `i16` for bfloat

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}} // expected-error@+1 {{conflicting attributes for state 'zt0'}} void

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-12 Thread Alexandros Lamprineas via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma labrinea wrote: Right, I didn't know that the resolver

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/81331 >From 50c0bacb8c33ff0c3caf5554bd198904839a2d2c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 9 Feb 2024 16:13:42 -0600 Subject: [PATCH] [WIP][LLVM] Add `__builtin_readsteadycounter` intrinsic and

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
@@ -2764,6 +2764,37 @@ Query for this feature with ``__has_builtin(__builtin_readcyclecounter)``. Note that even if present, its use may depend on run-time privilege or other OS controlled state. +``__builtin_readsteadycounter`` +-- +

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
@@ -104,6 +104,7 @@ std::string SDNode::getOperationName(const SelectionDAG *G) const { case ISD::ATOMIC_STORE: return "AtomicStore"; case ISD::PCMARKER: return "PCMarker"; case ISD::READCYCLECOUNTER: return "ReadCycleCounter";

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: this seems to break `-fPIE` builds of clang on Linux with the following: ``` ld.lld: error: undefined symbol: alloca >>> referenced by cc1_main.cpp >>> >>> tools/clang/tools/driver/CMakeFiles/clang.dir/cc1_main.cpp.o:(ensureStackAddressSpace()) ``` the call to

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81527 Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call. >From c67d64d7ca5885b03b6e0738d5e237ccbd3ed38a Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 12 Feb 2024 12:31:37 -0800

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes Added checkedDowncast, uncheckedDowncast, toString as safe functions to call. --- Full diff: https://github.com/llvm/llvm-project/pull/81527.diff 3 Files Affected: - (modified)

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81532)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes Added checkedDowncast, uncheckedDowncast, toString as safe functions to call. --- Full diff: https://github.com/llvm/llvm-project/pull/81532.diff 3 Files Affected: - (modified)

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

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

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81532)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/81532 Added checkedDowncast, uncheckedDowncast, & toString as safe functions to call. >From 7596e70e7ed63d881d4754f3f18b9e01f38f176f Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Mon, 12 Feb 2024 12:31:37 -0800

[clang] [Clang] Fixes of builtin definitions after PR #68324. (PR #81022)

2024-02-12 Thread via cfe-commits
michele-scandale wrote: > > There are still some differences that I haven't addressed here as they > > might be ok to have: > > ``` > > * `__builtin_rint{,f,l}` were defined with the `const` attribute, now they > > use the `const when FP exceptions are ignored` -- this seems due to the > >

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Arthur Eubanks (aeubanks) Changes PR #71709 broke the Linux PIE build with `undefined symbol: alloca` errors. With the newly included `clang/Basic/Builtins.h` in that PR, it surfaces an issue with a combination of two previous patches.

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/81533 PR #71709 broke the Linux PIE build with `undefined symbol: alloca` errors. With the newly included `clang/Basic/Builtins.h` in that PR, it surfaces an issue with a combination of two previous patches.

[clang] [clang] Remove old Linux kernel workaround for ensuring stack space (PR #81533)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll approved this pull request. https://github.com/llvm/llvm-project/pull/81533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny edited https://github.com/llvm/llvm-project/pull/80541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/81542 This patch expands notion of "interesting" in `IdentifierInto` it to also cover ObjC keywords and builtins, which matches noting of "interesting" in serialization layer. What was previously "interesting" in

[clang] [clang] Use "notable" for "interesting" identifiers in `IdentifierInfo` (PR #81542)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Vlad Serebrennikov (Endilll) Changes This patch expands notion of "interesting" in `IdentifierInto` it to also cover ObjC keywords and builtins, which matches noting of "interesting" in serialization layer. What was previously

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Julian Schmidt via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] clangCodeGen: Introduce `mcdc::State` with `MCDCState.h` (PR #81497)

2024-02-12 Thread NAKAMURA Takumi via cfe-commits
chapuni wrote: @evodius96 Thanks. I can wait for other comments for a few days. Considerations: * `MCDCState.h` is enough small to be embeded into `CodeGenPGO.h`. I guess it nasty a bit if I did, though. * `MCDCState.h` involves `CoverageMapping.h`, that is not small. It shall be replaced

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Piotr Zegar via cfe-commits
Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny =?utf-8?q?Mösch?= , Danny

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/80823 >From 560713b5d45236956198654a10e0795eb56cad7b Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Tue, 6 Feb 2024 13:23:36 +0300 Subject: [PATCH 1/4] [Clang] Add some CodeGen tests for CWG 2xx issues This

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/5] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && dtemirbulatov wrote: Done.

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam edited https://github.com/llvm/llvm-project/pull/81514 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [alpha.webkit.UncountedCallArgsChecker] Check the safety of the object argument in a member function call. (PR #81400)

2024-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/81400 >From 04e18254efc4f671e0bbd9625c7e994fe47c1636 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Sun, 11 Feb 2024 00:07:30 -0800 Subject: [PATCH] [alpha.webkit.UncountedCallArgsChecker] Check the safety of the

[clang] [llvm] New calling convention preserve_none (PR #76868)

2024-02-12 Thread Brandt Bucher via cfe-commits
brandtbucher wrote: Thanks for working on this! It's really appreciated. Two follow-up questions: - Is AArch64 support planned soon? - Am I correct in understanding that this missed the LLVM 18 cut, and won't until LLVM 19 in mid-August-ish? https://github.com/llvm/llvm-project/pull/76868

[clang] [alpha.webkit.UncountedCallArgsChecker] Add a few more safe functions to call. (PR #81527)

2024-02-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 535da10842c7309e9eeaf9828cf6bb034fecaf16 c67d64d7ca5885b03b6e0738d5e237ccbd3ed38a --

[clang] [clang] Remove #undef alloca (PR #81534)

2024-02-12 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: seeing if Windows CI catches anything https://github.com/llvm/llvm-project/pull/81534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove #undef alloca (PR #81534)

2024-02-12 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks created https://github.com/llvm/llvm-project/pull/81534 Added in 26670dcba1609574cba5942aff78ff97b567c5f3. >From c659a573a066809473ebb36421e612dcdcda5aef Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Mon, 12 Feb 2024 21:01:39 + Subject: [PATCH] [clang]

[clang] [clang-tools-extra] [clang-tidy] Add new check `modernize-use-designated-initializers` (PR #80541)

2024-02-12 Thread Danny Mösch via cfe-commits
https://github.com/SimplyDanny updated https://github.com/llvm/llvm-project/pull/80541 From 528ec390e23e6883356606c9acdba3315d5f59bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20M=C3=B6sch?= Date: Sat, 3 Feb 2024 13:13:50 +0100 Subject: [PATCH 01/27] Trigger on variable declarations ---

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-02-12 Thread Vadim D. via cfe-commits
https://github.com/vvd170501 updated https://github.com/llvm/llvm-project/pull/81364 >From 9701011a9c88397cf3bb2c089e7295f62c7e13fe Mon Sep 17 00:00:00 2001 From: vvd170501 <36827317+vvd170...@users.noreply.github.com> Date: Sat, 10 Feb 2024 19:19:52 +0300 Subject: [PATCH 1/4] Add

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #79236)

2024-02-12 Thread Jun Wang via cfe-commits
@@ -167,6 +167,10 @@ def FeatureCuMode : SubtargetFeature<"cumode", "Enable CU wavefront execution mode" >; +def FeaturePreciseMemory jwanggit86 wrote: As it is, we have a clang command-line option "-mamdgpu-precise-memory-op". When specified,

[clang] [clang] Implement `__is_layout_compatible` (PR #81506)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/81506 This patch implements `__is_layout_compatible`, which backs up `std::is_layout_compatible` type trait introduced in C++20 ([P0466R5](https://wg21.link/p0466r5) "Layout-compatibility and

[clang] [llvm] [TargetParser][AArch64] Add alias for FEAT_RDM. (PR #80540)

2024-02-12 Thread Jon Roelofs via cfe-commits
@@ -673,7 +673,7 @@ int hoo(void) { // // // CHECK: Function Attrs: noinline nounwind optnone -// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdm +// CHECK-LABEL: define {{[^@]+}}@fmv_inline._MlseMrdma jroelofs wrote: FWIW, I think it's okay to change this

[clang] [clang-format] Don't remove parentheses in macro definitions (PR #81444)

2024-02-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/81444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add some CodeGen tests for CWG 2xx issues (PR #80823)

2024-02-12 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/80823 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -283,9 +283,23 @@ class ComplexExprEmitter ComplexPairTy EmitComplexBinOpLibCall(StringRef LibCallName, const BinOpInfo ); - QualType getPromotionType(QualType Ty) { + QualType getPromotionType(QualType Ty, bool IsDivOpCode =

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

[clang] [CLANG] Full support of complex multiplication and division. (PR #81514)

2024-02-12 Thread Andy Kaylor via cfe-commits
@@ -1847,19 +1847,25 @@ floating point semantic models: precise (the default), strict, and fast. * ``16`` - Forces ``_Float16`` operations to be emitted without using excess precision arithmetic. -.. option:: -fcx-limited-range: - - This option enables the naive

  1   2   3   4   5   >