[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-06 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto created https://github.com/llvm/llvm-project/pull/71452 Emission of `mustprogress` attribute was previously occuring only when entering `EmitFunctionBody`. Other paths for function body generation may lack the attribute, potentially leading to suboptimal opt

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/71452 >From e02ce12599aabe00e10fc0f8297b3c1bfd46456c Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Mon, 6 Nov 2023 23:20:31 +0100 Subject: [PATCH] [clang][CodeGen] Ensure consistent `mustprogress` att

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto ready_for_review https://github.com/llvm/llvm-project/pull/71452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: I wonder if we should have `return getLangOpts().CPlusPlus11 || getLangOpts().C11;` at line 586: https://github.com/llvm/llvm-project/blob/d1fb9307951319eea3e869d78470341d603c8363/clang/lib/CodeGen/CodeGenFunction.h#L573-L587 But I couldn't find anything strictly relate

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-08 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/71452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-09 Thread Antonio Frighetto via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-10 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/71452 >From f80a4277966452934c142bc374bfb4f1acba4ad9 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Mon, 6 Nov 2023 23:20:31 +0100 Subject: [PATCH] [clang][CodeGen] Ensure consistent `mustprogress` att

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-10 Thread Antonio Frighetto via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-10 Thread Antonio Frighetto via cfe-commits
@@ -1482,6 +1477,11 @@ void CodeGenFunction::GenerateCode(GlobalDecl GD, llvm::Function *Fn, } else llvm_unreachable("no definition for emitted function"); + // This is checked after emitting the function body so we know if there + // are any permitted infinite loops.

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-11 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/71452 >From 970bf07d0b184c7ec356ae8f47b193a5e3ff0309 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Mon, 6 Nov 2023 23:20:31 +0100 Subject: [PATCH] [clang][CodeGen] Ensure consistent `mustprogress` att

[clang] 970bf07 - [clang][CodeGen] Ensure consistent `mustprogress` attribute emission

2023-11-11 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-11-11T09:43:03+01:00 New Revision: 970bf07d0b184c7ec356ae8f47b193a5e3ff0309 URL: https://github.com/llvm/llvm-project/commit/970bf07d0b184c7ec356ae8f47b193a5e3ff0309 DIFF: https://github.com/llvm/llvm-project/commit/970bf07d0b184c7ec356ae8f47b193a5e3ff0309.d

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-11 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/71452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4effdc4 - [clang][CodeGen] Regenerate `wasm-eh.cpp` test (NFC)

2023-11-11 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-11-11T11:59:59+01:00 New Revision: 4effdc47947b9260a1540ee7d8b699b077cbedb5 URL: https://github.com/llvm/llvm-project/commit/4effdc47947b9260a1540ee7d8b699b077cbedb5 DIFF: https://github.com/llvm/llvm-project/commit/4effdc47947b9260a1540ee7d8b699b077cbedb5.d

[clang-tools-extra] [clang] [llvm] [AArch64] Add an AArch64 pass for loop idiom transformations (PR #72273)

2023-12-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/72273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [AArch64] Add an AArch64 pass for loop idiom transformations (PR #72273)

2023-12-13 Thread Antonio Frighetto via cfe-commits
@@ -0,0 +1,726 @@ + +//===- AArch64LoopIdiomTransform.cpp - Loop idiom recognition -===// +// +// 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] [clang-tools-extra] [AArch64] Add an AArch64 pass for loop idiom transformations (PR #72273)

2023-12-13 Thread Antonio Frighetto via cfe-commits
@@ -0,0 +1,726 @@ + +//===- AArch64LoopIdiomTransform.cpp - Loop idiom recognition -===// +// +// 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:

[llvm] [mlir] [flang] [clang-tools-extra] [libcxx] [openmp] [lldb] [compiler-rt] [libc] [clang] [lld] fix issue 73559. (PR #74926)

2023-12-16 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: Could you kindly squash everything into one commit and provide a meaningful git commit title and git message description? For example: ``` [clang][Parse] `TryAnnotateCXXScopeToken` to be called only when parsing C++ Assume `TryAnnotateCXXScopeToken` to be parsing C++ cod

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From 869f015ac440ff1885caf44abffe28cd6ebf0f13 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 6 Mar 2024 23:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow `memcpy` replace with trivial

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From 3c006a4fbec11e7e8ccaadbf347484077597894f Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 6 Mar 2024 23:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow `memcpy` replace with trivial

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: @efriedma-quic, comment updated, thanks. https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-15 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: @nikic, updated PR description as well, thanks. https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-21 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From bfc29a350458e9b8d20d7398595c3f36503e2d72 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Thu, 7 Mar 2024 07:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow `memcpy` replace with trivial

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-21 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From b433076fcbacba8a3b91446390bbea5843322bcd Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Thu, 7 Mar 2024 07:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow `memcpy` replace with trivial

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-21 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b433076 - [clang][CodeGen] Allow `memcpy` replace with trivial auto var init

2024-03-21 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2024-03-21T09:55:04+01:00 New Revision: b433076fcbacba8a3b91446390bbea5843322bcd URL: https://github.com/llvm/llvm-project/commit/b433076fcbacba8a3b91446390bbea5843322bcd DIFF: https://github.com/llvm/llvm-project/commit/b433076fcbacba8a3b91446390bbea5843322bcd.d

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-23 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: @tstellar Yes, thanks (I opened a new PR for that: https://github.com/llvm/llvm-project/pull/86106). https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] 8c6e96d - [clang][Dataflow] Fix unnecessary copy in `initializeFieldsWithValues` (NFC)

2024-02-13 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2024-02-13T11:05:26+01:00 New Revision: 8c6e96d9eb35849762fa3ab4d3cc9517c4e14e74 URL: https://github.com/llvm/llvm-project/commit/8c6e96d9eb35849762fa3ab4d3cc9517c4e14e74 DIFF: https://github.com/llvm/llvm-project/commit/8c6e96d9eb35849762fa3ab4d3cc9517c4e14e74.d

[clang] Revert "[clang] Avoid memcopy for small structure with padding under … (PR #84230)

2024-03-06 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto created https://github.com/llvm/llvm-project/pull/84230 …-ftrivial-auto-var-init (#71677)" This reverts commit afe8b93ffdfef5d8879e1894b9d7dda40dee2b8d. Fixes regression: https://github.com/llvm/llvm-project/issues/84178. >From bb22eccc90d0e8cb02be5d4c47a08

[clang] Revert "[clang] Avoid memcopy for small structure with padding under … (PR #84230)

2024-03-06 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From 91ca7b2e5c98a7caa8a97f05f57e84f68d861fa3 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 6 Mar 2024 23:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow memcpy replace with trivial au

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-06 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-06 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: I think manually checking if `TrivialAutoVarInit` is set (to `Pattern`?) may be a better fix, as there was only [one codepath](https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CGDecl.cpp#L1972-L1974) in which we were not checking this. https://github.co

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-07 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/84230 >From e5af3e3242b34811eb56d91597bfc58e89f9e2db Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 6 Mar 2024 23:49:40 +0100 Subject: [PATCH] [clang][CodeGen] Allow memcpy replace with trivial au

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-07 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: Fixed `auto-var-init.cpp` test failures, believe now it should be aligned with the original intent. https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][CodeGen] Allow memcpy replace with trivial auto var init (PR #84230)

2024-03-07 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/84230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2dea969 - [clang][CodeGen] Introduce `-frecord-command-line` for MachO

2023-07-24 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-07-24T09:24:59+02:00 New Revision: 2dea969d8337251e4c9335fd601bd4e0e5dee10f URL: https://github.com/llvm/llvm-project/commit/2dea969d8337251e4c9335fd601bd4e0e5dee10f DIFF: https://github.com/llvm/llvm-project/commit/2dea969d8337251e4c9335fd601bd4e0e5dee10f.d

[clang] ffb8434 - [clang] Prevent unnecessary copies in `SymbolGraphSerializer` (NFC)

2023-09-08 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-09-08T17:19:06+02:00 New Revision: ffb8434f6a514fb3c06e0bdaff6d4ee410924ff6 URL: https://github.com/llvm/llvm-project/commit/ffb8434f6a514fb3c06e0bdaff6d4ee410924ff6 DIFF: https://github.com/llvm/llvm-project/commit/ffb8434f6a514fb3c06e0bdaff6d4ee410924ff6.d

[clang] [clang][AST] Bail out when handling union access with virtual inheritance (PR #66243)

2023-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto created https://github.com/llvm/llvm-project/pull/66243: An assertion issue that arose when handling union member access with virtual base class has been addressed. As pointed out by @zygoloid, there is no need for further derived-to-base analysis in this in

[clang] [clang][AST] Bail out when handling union access with virtual inheritance (PR #66243)

2023-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto review_requested https://github.com/llvm/llvm-project/pull/66243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Bail out when handling union access with virtual inheritance (PR #66243)

2023-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto review_requested https://github.com/llvm/llvm-project/pull/66243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Bail out when handling union access with virtual inheritance (PR #66243)

2023-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto review_requested https://github.com/llvm/llvm-project/pull/66243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][AST] Bail out when handling union access with virtual inheritance (PR #66243)

2023-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto review_requested https://github.com/llvm/llvm-project/pull/66243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 660876a - [clang] Bail out when handling union access with virtual inheritance

2023-09-13 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2023-09-14T08:48:59+02:00 New Revision: 660876a4019b81b5a7427a3dcec5ce8c39cd1ee0 URL: https://github.com/llvm/llvm-project/commit/660876a4019b81b5a7427a3dcec5ce8c39cd1ee0 DIFF: https://github.com/llvm/llvm-project/commit/660876a4019b81b5a7427a3dcec5ce8c39cd1ee0.d

[clang] [clang][AST] Bail out when handling union access with virtual inheritance (PR #66243)

2023-09-13 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: Closing this as landed in 660876a4019b81b5a7427a3dcec5ce8c39cd1ee0. Thanks. https://github.com/llvm/llvm-project/pull/66243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang][AST] Bail out when handling union access with virtual inheritance (PR #66243)

2023-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/66243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-05 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto commented: I think this makes sense. https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-02 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: Are the TODOs encompassing all the cases? Why we don't want to set the flags in `PHITransAddr` as well? https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr` (PR #92277)

2024-05-15 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto created https://github.com/llvm/llvm-project/pull/92277 Ignore `ImplicitCastExpr` when building `AttrExp` for capability attribute diagnostics. Fixes: https://github.com/llvm/llvm-project/issues/92118. >From fb668a484553f1a62e2461e8cd2bb1484792eb6d Mon Sep

[clang] [clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr` (PR #92277)

2024-05-18 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/92277 >From 2c2e0507e92bdb77a01828f899ff59e44492b537 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 15 May 2024 17:03:02 +0200 Subject: [PATCH] [clang][ThreadSafety] Skip past implicit cast in `t

[clang] 2c2e050 - [clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr`

2024-05-18 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2024-05-18T09:49:10+02:00 New Revision: 2c2e0507e92bdb77a01828f899ff59e44492b537 URL: https://github.com/llvm/llvm-project/commit/2c2e0507e92bdb77a01828f899ff59e44492b537 DIFF: https://github.com/llvm/llvm-project/commit/2c2e0507e92bdb77a01828f899ff59e44492b537.d

[clang] [clang][ThreadSafety] Skip past implicit cast in `translateAttrExpr` (PR #92277)

2024-05-18 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/92277 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Instrumentation] Move out to Utils (NFC) (PR #108532)

2024-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto created https://github.com/llvm/llvm-project/pull/108532 Utility functions have been moved out to Utils. Minor opportunity to drop the header where not needed. >From 42fef89fcc75d7f1f869c70d5357fcf3a0d410e1 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto D

[clang] [llvm] [Instrumentation] Move out to Utils (NFC) (PR #108532)

2024-09-13 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/108532 >From 4518980e2698b76825d9650373df7414f61062d9 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Fri, 13 Sep 2024 11:43:30 +0200 Subject: [PATCH] [Instrumentation] Move out to Utils (NFC) Utility

[clang] [llvm] [CVP] #114820 add 'samesign' for 'icmp' (PR #115642)

2024-11-10 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto approved this pull request. https://github.com/llvm/llvm-project/pull/115642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CVP] #114820 add 'samesign' for 'icmp' (PR #115642)

2024-11-10 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/115642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CVP] Add `samesign` flag to `icmp` (PR #115642)

2024-11-10 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/115642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [clang][CodeGen][AA] Add `!llvm.errno.tbaa` gathering int-compatible TBAA nodes (PR #125258)

2025-01-31 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: @nikic Mind glancing over the draft quickly? !llvm.errno.tbaa is being attached to individual load/store accessing errno, although I just realized that this information is already embedded in TBAA, so IIUC !llvm.errno.tbaa should just be a module-level list of int-compa

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-31 Thread Antonio Frighetto via cfe-commits
@@ -128,6 +128,15 @@ static void addLocAccess(MemoryEffects &ME, const MemoryLocation &Loc, ME |= MemoryEffects::argMemOnly(MR); return; } + // TODO: This should be refined to use upcoming Loc.TBAAErrno for errno + // memory, rather than manually inspecting the und

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-31 Thread Antonio Frighetto via cfe-commits
@@ -672,13 +703,15 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotThrow(F); Changed |= setDoesNotCapture(F, 0); Changed |= setOnlyReadsMemory(F, 0); +Changed |= setOnlyAccessesErrnoMemory(F); antoniofrighetto wrote

[clang] [llvm] [mlir] [InferAttrs] Mark errnomem-setting libcalls as such (PR #124742)

2025-01-31 Thread Antonio Frighetto via cfe-commits
@@ -554,6 +579,7 @@ bool llvm::inferNonMandatoryLibFuncAttrs(Function &F, Changed |= setDoesNotThrow(F); Changed |= setDoesNotCapture(F, 0); Changed |= setOnlyReadsMemory(F, 0); +Changed |= setOnlyAccessesErrnoMemory(F); antoniofrighetto wrote:

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-05 Thread Antonio Frighetto via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-04 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/120783 >From 196421e40425290aa1296f63c8fd9fbf205ea4b9 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Fri, 20 Dec 2024 19:30:59 +0100 Subject: [PATCH] [IR][ModRef] Introduce `errno` memory location Mod

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-05 Thread Antonio Frighetto via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-02-05 Thread Antonio Frighetto via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2024-12-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/120783 >From 81c1e35fc28f43c2f23df328244de0528f4bf1d0 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Fri, 20 Dec 2024 19:30:59 +0100 Subject: [PATCH 1/2] [IR][ModRef] Introduce `errno` memory location

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-22 Thread Antonio Frighetto via cfe-commits
@@ -11610,9 +11610,10 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, bool TakingCandidateAddress) { TemplateParameter Param = DeductionFailure.getTemplateParameter(); NamedDecl *ParamD; - (ParamD = Param.dy

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-22 Thread Antonio Frighetto via cfe-commits
@@ -11714,13 +11715,52 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-22 Thread Antonio Frighetto via cfe-commits
@@ -11714,13 +11715,52 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, return; } - case TemplateDeductionResult::InvalidExplicitArguments: + case TemplateDeductionResult::InvalidExplicitArguments: { assert(ParamD && "no parameter f

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-22 Thread Antonio Frighetto via cfe-commits
@@ -11610,9 +11610,10 @@ static void DiagnoseBadDeduction(Sema &S, NamedDecl *Found, Decl *Templated, bool TakingCandidateAddress) { TemplateParameter Param = DeductionFailure.getTemplateParameter(); NamedDecl *ParamD; - (ParamD = Param.dy

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-01-20 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/120783 >From 54d3ac991abaa341dd4798bbf6aeb3ede4441d64 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Fri, 20 Dec 2024 19:30:59 +0100 Subject: [PATCH] [IR][ModRef] Introduce `errno` memory location Mod

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-01-20 Thread Antonio Frighetto via cfe-commits
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) { @G = external global ptr define i8 @test_store_capture(ptr %p) { -; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: read, inaccessiblemem: none) +; FNATTRS: Functio

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-01-28 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/120783 >From 54d3ac991abaa341dd4798bbf6aeb3ede4441d64 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Fri, 20 Dec 2024 19:30:59 +0100 Subject: [PATCH 1/2] [IR][ModRef] Introduce `errno` memory location

[clang] [llvm] [mlir] [IR][ModRef] Introduce `errno` memory location (PR #120783)

2025-01-09 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: Kind ping for correct direction. https://github.com/llvm/llvm-project/pull/120783 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Improve template argument deduction diagnostic (PR #122754)

2025-01-15 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/122754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][CodeGen][AA] Add `!llvm.errno.tbaa` gathering int-compatible TBAA nodes (PR #125258)

2025-02-21 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/125258 >From 25e79b19581d47924c4b1a56d954031a09600b8f Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Tue, 18 Feb 2025 16:36:12 +0100 Subject: [PATCH 1/3] [GVN] Introduce test for PR125258 (NFC) --- .

[clang] [llvm] [clang][CodeGen][AA] Add `!llvm.errno.tbaa` gathering int-compatible TBAA nodes (PR #125258)

2025-02-21 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: > > so IIUC !llvm.errno.tbaa should just be a module-level list of > > int-compatible TBAA nodes. > > Yes, exactly. It should be a module level MD node, not on individual > instructions. Thank you, I'm updating this. I've been contemplating this, and thought originall

[clang] [clang][Sema] Propagate `volatile` during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
@@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -ast-dump %s | FileCheck %s antoniofrighetto wrote: Added a test in CodeGen too, thanks! https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits ma

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH 1/2] [clang][Sema] Propagate qualifiers during deriv

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH 1/2] [clang][Sema] Propagate qualifiers during deriv

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
@@ -3107,8 +3107,11 @@ Sema::PerformObjectMemberConversion(Expr *From, /*IgnoreAccess=*/true)) return ExprError(); - return ImpCastExprToType(From, DestType, CK_UncheckedDerivedToBase, - VK, &BasePath); + if (F

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH 1/2] [clang][Sema] Propagate qualifiers during deriv

[clang] [clang][Sema] Propagate `volatile` during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH] [clang][Sema] Propagate qualifiers during derived-t

[clang] [clang][Sema] Propagate `volatile` during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
@@ -3107,8 +3107,11 @@ Sema::PerformObjectMemberConversion(Expr *From, /*IgnoreAccess=*/true)) return ExprError(); - return ImpCastExprToType(From, DestType, CK_UncheckedDerivedToBase, - VK, &BasePath); + if (F

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-22 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Propagate `volatile` qualifier in derived-to-base conversion (PR #127824)

2025-02-20 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From 1c7357a3279322ba469c1293d49bfba67b0565b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH] [clang][Sema] Propagate `volatile` during derived-t

[clang] [clang][Sema] Propagate `volatile` during derived-to-base conversion (PR #127824)

2025-02-20 Thread Antonio Frighetto via cfe-commits
antoniofrighetto wrote: > Should the result type of the ImplicitCastExpr be volatile in the AST? Definitely, updated, thanks! https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [clang][Sema] Propagate `volatile` during derived-to-base conversion (PR #127824)

2025-02-20 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate `volatile` during derived-to-base conversion (PR #127824)

2025-02-20 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto edited https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-27 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From aebd5455e9cf583b9f5a29c68d5217f49c7a49b5 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH 1/3] [clang][Sema] Propagate qualifiers during deriv

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-02-27 Thread Antonio Frighetto via cfe-commits
@@ -3107,8 +3107,12 @@ Sema::PerformObjectMemberConversion(Expr *From, /*IgnoreAccess=*/true)) return ExprError(); - return ImpCastExprToType(From, DestType, CK_UncheckedDerivedToBase, - VK, &BasePath); + Quali

[clang] [clang][CodeGen] Propagate `volatile` qualifier in derived-to-base conversion (PR #127824)

2025-02-19 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto created https://github.com/llvm/llvm-project/pull/127824 A miscompilation issue has been addressed with improved handling. Fixes: https://github.com/llvm/llvm-project/issues/127683. >From fd06a833ba56f812693d89e19f594ed3f238fea4 Mon Sep 17 00:00:00 2001 From

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-03-11 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From 47fc0c9fb963cef24a32078bc52232e69a93c211 Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Feb 2025 16:47:18 +0100 Subject: [PATCH] [clang][Sema] Propagate qualifiers during derived-t

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-03-11 Thread Antonio Frighetto via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -ast-dump %s | FileCheck %s + +// Ensure volatile is preserved during derived-to-base conversion. antoniofrighetto wrote: Added, thanks! `__ptrauth` is in the process of being upstreamed, whereas `_A

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-03-19 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto closed https://github.com/llvm/llvm-project/pull/127824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Propagate qualifiers during derived-to-base conversion (PR #127824)

2025-03-19 Thread Antonio Frighetto via cfe-commits
https://github.com/antoniofrighetto updated https://github.com/llvm/llvm-project/pull/127824 >From e9988c36ed788b2d1ce00b028bed51169bd8b02c Mon Sep 17 00:00:00 2001 From: Antonio Frighetto Date: Wed, 19 Mar 2025 09:04:29 +0100 Subject: [PATCH] [clang][Sema] Propagate qualifiers during derived-t

[clang] e9988c3 - [clang][Sema] Propagate qualifiers during derived-to-base conversion

2025-03-19 Thread Antonio Frighetto via cfe-commits
Author: Antonio Frighetto Date: 2025-03-19T09:04:29+01:00 New Revision: e9988c36ed788b2d1ce00b028bed51169bd8b02c URL: https://github.com/llvm/llvm-project/commit/e9988c36ed788b2d1ce00b028bed51169bd8b02c DIFF: https://github.com/llvm/llvm-project/commit/e9988c36ed788b2d1ce00b028bed51169bd8b02c.d

  1   2   >