[clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2023-12-15 Thread Timm Baeder via cfe-commits
tbaederr wrote: I like this change, the only thing I'm a little afraid of is that the output will deteriorate for large structs https://github.com/llvm/llvm-project/pull/74852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] 7a0fd97 - [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (#75657)

2023-12-15 Thread via cfe-commits
Author: smanna12 Date: 2023-12-15T22:09:19-06:00 New Revision: 7a0fd97ac1094b9b1547c8d7b35e583d7387224d URL: https://github.com/llvm/llvm-project/commit/7a0fd97ac1094b9b1547c8d7b35e583d7387224d DIFF: https://github.com/llvm/llvm-project/commit/7a0fd97ac1094b9b1547c8d7b35e583d7387224d.diff LOG:

[clang] [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (PR #75657)

2023-12-15 Thread via cfe-commits
https://github.com/smanna12 closed https://github.com/llvm/llvm-project/pull/75657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-15 Thread Fred Fu via cfe-commits
capfredf wrote: @vgvassilev Sure. https://github.com/llvm/llvm-project/pull/75556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [mlir] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-15 Thread via cfe-commits
@@ -362,14 +362,20 @@ mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op, auto clonedOp = cast( cloneOpAndUpdateDestinationArgs(rewriter, op, clonedOpDestination)); - // 5b. Tile the cloned operation. + // 5b. Early return cloned op if tiling is

[clang] [clang-tools-extra] [mlir] [llvm] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-15 Thread via cfe-commits
https://github.com/MaheshRavishankar requested changes to this pull request. https://github.com/llvm/llvm-project/pull/75410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [mlir] [llvm] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-15 Thread via cfe-commits
https://github.com/MaheshRavishankar edited https://github.com/llvm/llvm-project/pull/75410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9950bb9 - [ASTReader] Fix readability-inconsistent-declaration-parameter-name. NFC

2023-12-15 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-12-15T17:11:21-08:00 New Revision: 9950bb994461d6dc67ac9b33e48f549edcb44739 URL: https://github.com/llvm/llvm-project/commit/9950bb994461d6dc67ac9b33e48f549edcb44739 DIFF: https://github.com/llvm/llvm-project/commit/9950bb994461d6dc67ac9b33e48f549edcb44739.diff

[clang] [llvm] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread David Peixotto via cfe-commits
@@ -216,15 +214,62 @@ void CGHLSLRuntime::addBufferResourceAnnotation(llvm::GlobalVariable *GV, assert(false && "Unsupported buffer type!"); return; } - assert(ResourceMD != nullptr && "ResourceMD must have been set by the switch above."); llvm::hls

[llvm] [clang] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread David Peixotto via cfe-commits
@@ -253,35 +246,6 @@ void UAVResource::print(raw_ostream &OS) const { ResourceBase::print(OS, "U", "u"); } -// FIXME: Capture this in HLSL source. I would go do this right now, but I want -// to get this in first so that I can make sure to capture all the extra -// informati

[clang] [llvm] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread David Peixotto via cfe-commits
https://github.com/dmpots edited https://github.com/llvm/llvm-project/pull/75674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread David Peixotto via cfe-commits
https://github.com/dmpots approved this pull request. https://github.com/llvm/llvm-project/pull/75674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen] Emit a more accurate alignment for non-temporal loads/stores (PR #75675)

2023-12-15 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/75675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/75650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [CodeGen][arm64e] Add methods and data members to Address, which are needed to authenticate signed pointers (PR #67454)

2023-12-15 Thread Akira Hatanaka via cfe-commits
@@ -232,19 +232,19 @@ static Value *MakeBinaryAtomicValue( static Value *EmitNontemporalStore(CodeGenFunction &CGF, const CallExpr *E) { Value *Val = CGF.EmitScalarExpr(E->getArg(0)); - Value *Address = CGF.EmitScalarExpr(E->getArg(1)); + Address Addr = CGF.EmitPointerWith

[clang] [clang][CGCUDANV] Unify PointerType members of CGNVCUDARuntime (NFC) (PR #75668)

2023-12-15 Thread Björn Pettersson via cfe-commits
bjope wrote: I don't know much about this code, so I can't really judge if this is good and wanted etc. When I did opaque pointer cleanups myself earlier (removing some no-op bitcasts and using PointerType::get etc) I did leave lots of things like this around on purpose, as even if the types

[clang] [CodeGen] Emit a more accurate alignment for non-temporal loads/stores (PR #75675)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Akira Hatanaka (ahatanak) Changes Call EmitPointerWithAlignment to compute the alignment based on the underlying lvalue's alignment when it's available. --- Full diff: https://github.com/llvm/llvm-project/pull/75675.diff 2 Files

[clang] [CodeGen] Emit a more accurate alignment for non-temporal loads/stores (PR #75675)

2023-12-15 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/75675 Call EmitPointerWithAlignment to compute the alignment based on the underlying lvalue's alignment when it's available. >From 641aba730a38038da0d5a9ef8a56fab908131144 Mon Sep 17 00:00:00 2001 From: Akira Hatanak

[llvm] [clang] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff b3e353d263f9d6ef061f4e6d89619c72a3553002 9d6e00bd972a563daefd67b544614e2bb609cc42 --

[clang] [llvm] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes Rather than shepherding a type name all the way to the backend as a string and attempting to parse it, get the element type out of the AST and store that in the resource annotation metadata directly. --- Pa

[llvm] [clang] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/75674 Rather than shepherding a type name all the way to the backend as a string and attempting to parse it, get the element type out of the AST and store that in the resource annotation metadata directly. >From 9d6e00

[clang] [clang] Add size filter for stack auto init (PR #74777)

2023-12-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM, but please wait others feedback https://github.com/llvm/llvm-project/pull/74777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [-Wunsafe-buffer-usage] Add a subgroup `-Wunsafe-buffer-usage-in-container` (PR #75665)

2023-12-15 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud approved this pull request. https://github.com/llvm/llvm-project/pull/75665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (PR #75657)

2023-12-15 Thread via cfe-commits
smanna12 wrote: Thank you @erichkeane for reviews! https://github.com/llvm/llvm-project/pull/75657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Malavika Samak via cfe-commits
@@ -721,6 +721,33 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; +// Warning gadget for unsafe invocation of span::data method. +// Triggers when the pointer returned by the invocation is imm

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Malavika Samak via cfe-commits
@@ -2261,6 +2261,21 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { // note_unsafe_buffer_operation doesn't have this mode yet. assert(!IsRelatedToDecl && "Not implemented yet!"); MsgParam = 3; + } else if (const auto *ECE =

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/75650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Malavika Samak via cfe-commits
@@ -721,6 +721,33 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; +// Warning gadget for unsafe invocation of span::data method. +// Triggers when the pointer returned by the invocation is imm

[clang] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #75652)

2023-12-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/75652 >From 964f9b98b389060e554e52e3c286255b4a25a7bb Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 15 Dec 2023 11:16:37 -0800 Subject: [PATCH] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment -fand

[clang-tools-extra] [clangd] Make sure ninja can clean "ClangdXPC.framework" (PR #75669)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Jan Svoboda (jansvoboda11) Changes After building the ClangdXPC target, `ninja clean` fails with the following error: ``` ninja: error: remove(lib/ClangdXPC.framework): Directory not empty ninja: error: remove(/lib/ClangdXPC.frame

[clang-tools-extra] [clangd] Make sure ninja can clean "ClangdXPC.framework" (PR #75669)

2023-12-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/75669 After building the ClangdXPC target, `ninja clean` fails with the following error: ``` ninja: error: remove(lib/ClangdXPC.framework): Directory not empty ninja: error: remove(/lib/ClangdXPC.framework): Dire

[clang] [clang] Add size filter for stack auto init (PR #74777)

2023-12-15 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: As we discussed offline, it would nice to handle cases like this ``` struct Foo { int x; // we should try to make sure X is initialized. char buff[1024]; // this one is fine to skip }; void main() { Foo foo; } ``` But seems moving size check deeper does not help. I

[clang] [clang][CGCUDANV] Unify PointerType members of CGNVCUDARuntime (NFC) (PR #75668)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Youngsuk Kim (JOE1994) Changes Unify 3 `Pointertype *` members which all refer to the same llvm type. Opaque pointer clean-up effort. --- Full diff: https://github.com/llvm/llvm-project/pull/75668.diff 1 Files Affected: - (modified) cl

[clang] [clang][CGCUDANV] Unify PointerType members of CGNVCUDARuntime (NFC) (PR #75668)

2023-12-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 created https://github.com/llvm/llvm-project/pull/75668 Unify 3 `Pointertype *` members which all refer to the same llvm type. Opaque pointer clean-up effort. >From 2f07997d202a8e845e866d0dedbfbcded0bf9518 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Fri, 15 De

[clang] eccc1cc - Revert "[NFC] [Serialization] Packing more bits and refactor AbbrevToUse"

2023-12-15 Thread Augusto Noronha via cfe-commits
Author: Augusto Noronha Date: 2023-12-15T14:43:25-08:00 New Revision: eccc1cca71bb704e4dcaabccc993d08fd15b46a2 URL: https://github.com/llvm/llvm-project/commit/eccc1cca71bb704e4dcaabccc993d08fd15b46a2 DIFF: https://github.com/llvm/llvm-project/commit/eccc1cca71bb704e4dcaabccc993d08fd15b46a2.dif

[clang] 87bd71e - Revert "[NFC] Fix the warning Wcovered-switch-default"

2023-12-15 Thread Augusto Noronha via cfe-commits
Author: Augusto Noronha Date: 2023-12-15T14:43:25-08:00 New Revision: 87bd71efd0af21b6663a7729317952535446f36d URL: https://github.com/llvm/llvm-project/commit/87bd71efd0af21b6663a7729317952535446f36d DIFF: https://github.com/llvm/llvm-project/commit/87bd71efd0af21b6663a7729317952535446f36d.dif

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Ziqing Luo via cfe-commits
@@ -2261,6 +2261,21 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { // note_unsafe_buffer_operation doesn't have this mode yet. assert(!IsRelatedToDecl && "Not implemented yet!"); MsgParam = 3; + } else if (const auto *ECE =

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Ziqing Luo via cfe-commits
@@ -721,6 +721,33 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; +// Warning gadget for unsafe invocation of span::data method. +// Triggers when the pointer returned by the invocation is imm

[clang] [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (PR #75657)

2023-12-15 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/75657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Add a subgroup `-Wunsafe-buffer-usage-in-container` (PR #75665)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes Add a sub diagnostic group under `-Wunsafe-buffer-usage` controlled by `-Wunsafe-buffer-usage-in-container`. The subgroup will include warnings on misuses of `std::span`, `std::vector`, and `std::array`.

[clang] [-Wunsafe-buffer-usage] Add a subgroup `-Wunsafe-buffer-usage-in-container` (PR #75665)

2023-12-15 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/75665 Add a sub diagnostic group under `-Wunsafe-buffer-usage` controlled by `-Wunsafe-buffer-usage-in-container`. The subgroup will include warnings on misuses of `std::span`, `std::vector`, and `std::array`.

[libcxx] [clang] [PowerPC] Emit libcall to frexpl for calls to frexp(ppcDoublDouble) (PR #75226)

2023-12-15 Thread Lei Huang via cfe-commits
https://github.com/lei137 closed https://github.com/llvm/llvm-project/pull/75226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aaa3f72 - [PowerPC] Emit libcall to frexpl for calls to frexp(ppcDoublDouble) (#75226)

2023-12-15 Thread via cfe-commits
Author: Lei Huang Date: 2023-12-15T17:23:16-05:00 New Revision: aaa3f72c1ce6e1757df79c0d02e0675201ee07a3 URL: https://github.com/llvm/llvm-project/commit/aaa3f72c1ce6e1757df79c0d02e0675201ee07a3 DIFF: https://github.com/llvm/llvm-project/commit/aaa3f72c1ce6e1757df79c0d02e0675201ee07a3.diff LOG

[clang] [clang-tools-extra] [clang-tidy] Added new check to detect redundant inline keyword (PR #73069)

2023-12-15 Thread Félix-Antoine Constantin via cfe-commits
@@ -0,0 +1,113 @@ +//===--- RedundantInlineSpecifierCheck.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-tools-extra] [libcxx] [flang] [compiler-rt] [libc] [llvm] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[llvm] [compiler-rt] [clang-tools-extra] [clang] [flang] [libc] [libcxx] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread John McCall via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[libc] [libcxx] [llvm] [flang] [clang-tools-extra] [compiler-rt] [clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud requested changes to this pull request. https://github.com/llvm/llvm-project/pull/75650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud edited https://github.com/llvm/llvm-project/pull/75650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Rashmi Mudduluru via cfe-commits
@@ -721,6 +721,33 @@ class UnsafeBufferUsageAttrGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; +// Warning gadget for unsafe invocation of span::data method. +// Triggers when the pointer returned by the invocation is imm

[clang-tools-extra] [lldb] [libcxxabi] [lld] [flang] [libunwind] [compiler-rt] [clang] [llvm] [libc] [libcxx] [mlir] [asan] Install `pthread_atfork` (PR #75290)

2023-12-15 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: That's bad, we need to fix this. Do you see how we endup in handler, from `internal_fork`. `internal_fork` claims it will not call handlers. https://github.com/llvm/llvm-project/pull/75290 ___ cfe-commits mailing list cfe-commits@list

[clang] [mlir] [llvm] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-15 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/75217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (PR #75657)

2023-12-15 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/75657 >From f3cfe4cbc1053162b825cc144a5f5c0f73a40b77 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Fri, 15 Dec 2023 13:15:50 -0800 Subject: [PATCH 1/2] [NFC][CLANG] Rename duplicate loop attributes diagnostic f

[libc] [libcxx] [llvm] [flang] [clang-tools-extra] [compiler-rt] [clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread John McCall via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [flang][nfc] Refactor linker invocation logic (PR #75648)

2023-12-15 Thread Pete Steinfeld via cfe-commits
https://github.com/psteinfeld approved this pull request. All looks good. Thanks for the quick fix! https://github.com/llvm/llvm-project/pull/75648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (PR #75657)

2023-12-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 35a003c2b21082f3c47c8b01d9d1955af5ab098e f3cfe4cbc1053162b825cc144a5f5c0f73a40b77 --

[clang] [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (PR #75657)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch renames CheckForDuplicateCodeAlignAttrs() to CheckForDuplicateLoopAttrs() and corresponding other functions that call it to be used for other statement attributes in future. --- Full diff: https://githu

[clang] [NFC][CLANG] Rename duplicate loop attributes diagnostic functions (PR #75657)

2023-12-15 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/75657 This patch renames CheckForDuplicateCodeAlignAttrs() to CheckForDuplicateLoopAttrs() and corresponding other functions that call it to be used for other statement attributes in future. >From f3cfe4cbc1053162b8

[clang] [llvm] [mlir] [clang-tools-extra] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-15 Thread Han-Chung Wang via cfe-commits
https://github.com/hanhanW updated https://github.com/llvm/llvm-project/pull/75410 >From c07f7e1c5c6f8bbc7189e96096004d39a0a1aa3f Mon Sep 17 00:00:00 2001 From: hanhanW Date: Wed, 13 Dec 2023 15:59:48 -0800 Subject: [PATCH 1/2] [mlir][TilingInterface] Early return cloned ops if tile sizes are

[clang-tools-extra] [clang] [mlir] [llvm] [mlir][TilingInterface] Early return cloned ops if tile sizes are zeros. (PR #75410)

2023-12-15 Thread Han-Chung Wang via cfe-commits
@@ -362,14 +362,21 @@ mlir::scf::tileUsingSCFForOp(RewriterBase &rewriter, TilingInterface op, auto clonedOp = cast( cloneOpAndUpdateDestinationArgs(rewriter, op, clonedOpDestination)); - // 5b. Tile the cloned operation. + // 5b. Early return cloned op if tiling is

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2023-12-15 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl commented: I think this LGTM, but it would be good if someone else also took a look. https://github.com/llvm/llvm-project/pull/75385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2023-12-15 Thread Adrian Prantl via cfe-commits
@@ -238,6 +238,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, } } +// Avoid cloning local variables of subprograms that won't be cloned. adrian-prantl wrote: Can you add a sentence explaining why some subprograms

[clang] [libcxx] [PowerPC] Emit libcall to frexpl for calls to frexp(ppcDoublDouble) (PR #75226)

2023-12-15 Thread Lei Huang via cfe-commits
https://github.com/lei137 updated https://github.com/llvm/llvm-project/pull/75226 >From f38e709e414d1c9dae4f9d75f1decaf363bf9427 Mon Sep 17 00:00:00 2001 From: Lei Huang Date: Tue, 12 Dec 2023 10:58:34 -0600 Subject: [PATCH 1/3] [PowerPC] Emit libcall to frexpl for calls to frexp(ppcDoublDoubl

[clang] [llvm] [RISCV] Introduce and use BF16 in Xsfvfwmaccqqq intrinsics (PR #71140)

2023-12-15 Thread Craig Topper via cfe-commits
topperc wrote: This patch is unfortunately incorrect because Zvfbfmin implies Zfbfmin but the SiFive CPUs that implement Xsfvfwmaccqqq do not implement Zfbfmin. https://github.com/llvm/llvm-project/pull/71140 ___ cfe-commits mailing list cfe-commits@

[clang-tools-extra] [flang] [compiler-rt] [clang] [llvm] [libc] [libcxx] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

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

[clang-tools-extra] [flang] [compiler-rt] [clang] [llvm] [libc] [libcxx] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread John McCall via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang-tools-extra] [flang] [compiler-rt] [clang] [llvm] [libc] [libcxx] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang-tools-extra] [flang] [compiler-rt] [clang] [llvm] [libc] [libcxx] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread John McCall via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > Making Sema pull the TBAA info out of clang/lib/CodeGen is a layering > > violation (and probably breaks if we aren't actually generating code). If > > we need some notion of "aliasing" in Sema, we should pull the relevant code > > into clang/lib/AST. > > That's unfor

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2023-12-15 Thread Egor Zhdan via cfe-commits
egorzhdan wrote: @compnerd ping :) https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [compiler-rt] [llvm] [libc] [clang-tools-extra] [clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [libcxx] [compiler-rt] [llvm] [libc] [clang-tools-extra] [clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #75652)

2023-12-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff a4d1d5f5b54b2f93d7290588734f59ff24fc515c f82a3a8cf72ba4207fb2cdc04467079d51e20efa --

[clang] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #75652)

2023-12-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/75652 -fandroid-pad-segment is an Android-specific opt-in option that links in crt_pad_segment.o. crt_pad_segment.o contains a note section, which will be included in the linker-created PT_NOTE segment. This PT_NOTE te

[flang] [libcxx] [compiler-rt] [llvm] [libc] [clang-tools-extra] [clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
https://github.com/bwendling edited https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Warning for unsafe invocation of span::data (PR #75650)

2023-12-15 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/75650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] While refactoring projects to eradicate unsafe buffer accesses using … (PR #75650)

2023-12-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff ec92d74a0ef89b9dd46aee6ec8aca6bfd3c66a54 809bf6f4237f634feaeb7e5b0b88be3a2e4de455 --

[clang-tools-extra] [compiler-rt] [flang] [libcxx] [libc] [llvm] [clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] While refactoring projects to eradicate unsafe buffer accesses using … (PR #75650)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis @llvm/pr-subscribers-clang Author: Malavika Samak (malavikasamak) Changes …-Wunsafe-buffer-usage, there maybe accidental re-introduction of new OutOfBound accesses into the code bases. One such case is invoking span::data() method on a s

[clang] While refactoring projects to eradicate unsafe buffer accesses using … (PR #75650)

2023-12-15 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak created https://github.com/llvm/llvm-project/pull/75650 …-Wunsafe-buffer-usage, there maybe accidental re-introduction of new OutOfBound accesses into the code bases. One such case is invoking span::data() method on a span variable to retrieve a pointer, which

[libcxx] [clang] [PowerPC] Emit libcall to frexpl for calls to frexp(ppcDoublDouble) (PR #75226)

2023-12-15 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/75226 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [compiler-rt] [flang] [libcxx] [libc] [llvm] [clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread John McCall via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[clang] [flang][nfc] Refactor linker invocation logic (PR #75648)

2023-12-15 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm approved this pull request. Looks good to me. Did touch testing with my reproducers and it worked as I would expect it. https://github.com/llvm/llvm-project/pull/75648 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][lex] Fix non-portability diagnostics with absolute path (PR #74782)

2023-12-15 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: Ping. https://github.com/llvm/llvm-project/pull/74782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -1722,6 +1738,11 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, #include "clang/Driver/Options.inc" #undef CODEGEN_OPTION_WITH_MARSHALLING +#define DEBUG_OPTION_WITH_MARSHALLING(...) \

[llvm] [lldb] [clang] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -224,19 +233,20 @@ class CompilerInvocation : public CompilerInvocationBase { /// @{ // Note: These need to be pulled in manually. Otherwise, they get hidden by // the mutable getters with the same names. - using CompilerInvocationBase::getLangOpts; - using CompilerI

[lldb] [clang] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -11,6 +11,7 @@ #include "clang/APINotes/APINotesOptions.h" #include "clang/Basic/CodeGenOptions.h" +#include "clang/Basic/DebugOptions.h" jansvoboda11 wrote: Wouldn't a forward declaration be enough in this case? https://github.com/llvm/llvm-project/pull/

[clang] [llvm] [lldb] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
@@ -11,46 +11,13 @@ namespace clang { -CodeGenOptions::CodeGenOptions() { -#define CODEGENOPT(Name, Bits, Default) Name = Default; -#define ENUM_CODEGENOPT(Name, Type, Bits, Default) set##Name(Default); -#include "clang/Basic/CodeGenOptions.def" +CodeGenOptions::CodeGenOption

[clang] [lldb] [llvm] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 requested changes to this pull request. This looks pretty nice, I left just a couple of notes. You might want to take a look at the CI failures. https://github.com/llvm/llvm-project/pull/75530 ___ cfe-commits mailing li

[clang] [llvm] [lldb] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2023-12-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/75530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libc] [flang] [compiler-rt] [llvm] [libcxx] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

[libcxx] [clang] [clang-tools-extra] [llvm] [compiler-rt] [flang] [libc] Don't emit relax relocs like R_X86_64_REX_GOTPCRELX on X86 target for OPENMP internal vars. (PR #75564)

2023-12-15 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Scattering around `setDSOLocal(false)` makes the logic hard to understand. I'd strongly prefer to fix the initial setting of dso_local when we create the global variable. We can refactor the code to make that work. https://github.com/llvm/llvm-project/pull/75564

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

2023-12-15 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 updated https://github.com/llvm/llvm-project/pull/75647 >From bb15eebae9645e5383f26066093c0734ea76442d Mon Sep 17 00:00:00 2001 From: Jun Wang Date: Fri, 15 Dec 2023 13:53:54 -0600 Subject: [PATCH 1/2] [AMDGPU] Adding the amdgpu-num-work-groups function attribute

[flang] [clang] [flang][nfc] Refactor linker invocation logic (PR #75534)

2023-12-15 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: Updated version: https://github.com/llvm/llvm-project/pull/75648 https://github.com/llvm/llvm-project/pull/75534 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang][nfc] Refactor linker invocation logic (PR #75648)

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrzej Warzyński (banach-space) Changes Refactor how the Fortran runtime libs are added to the linker invocation. This is a non-functional change. This is an updated version of #75534. This iteration makes sure that FortranMain.a comes be

[clang] [flang][nfc] Refactor linker invocation logic (PR #75648)

2023-12-15 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space created https://github.com/llvm/llvm-project/pull/75648 Refactor how the Fortran runtime libs are added to the linker invocation. This is a non-functional change. This is an updated version of #75534. This iteration makes sure that FortranMain.a comes before Fort

[llvm] [libcxx] [clang-tools-extra] [compiler-rt] [clang] [flang] [libc] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-15 Thread Bill Wendling via cfe-commits
@@ -4022,8 +4169,36 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E, ArrayLV = EmitArraySubscriptExpr(ASE, /*Accessed*/ true); else ArrayLV = EmitLValue(Array); + auto *Idx = EmitIdxAfterBase(/*Promote*/true); +if (SanOp

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

2023-12-15 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 7bc6c4abe8e8d8ab70e02e4c2025a94dda01d908 bb15eebae9645e5383f26066093c0734ea76442d --

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

2023-12-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Jun Wang (jwanggit86) Changes A new function attribute named amdgpu-num-work-groups is added. This attribute allows programmers to let the compiler know the number of workgroups to be launched and do optimizations based on that i

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

2023-12-15 Thread Jun Wang via cfe-commits
https://github.com/jwanggit86 created https://github.com/llvm/llvm-project/pull/75647 A new function attribute named amdgpu-num-work-groups is added. This attribute allows programmers to let the compiler know the number of workgroups to be launched and do optimizations based on that informatio

  1   2   3   4   >