[clang-tools-extra] [clang-tidy] Improve `container-data-pointer` check to use `c_str()` (PR #71304)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Eli Black (neoncube2) Changes Improve clang-tidy's `container-data-pointer` check to use `c_str()`, when available. Fixes #55026 This is my first Clang PR! :) --- Full diff: https://github.com/llvm/llvm-project/pull/71304.diff 4

[clang-tools-extra] [clang-tidy] Improve `container-data-pointer` check to use `c_str()` (PR #71304)

2023-11-04 Thread Eli Black via cfe-commits
https://github.com/neoncube2 created https://github.com/llvm/llvm-project/pull/71304 Improve clang-tidy's `container-data-pointer` check to use `c_str()`, when available. Fixes #55026 This is my first Clang PR! :) >From 08fa26a6d6f0fbc242ec803f537110694d645e93 Mon Sep 17 00:00:00 2001 From:

[clang] [Driver][Solaris][NFC] A little bit of clean up (PR #69867)

2023-11-04 Thread Brad Smith via cfe-commits
brad0 wrote: @MaskRay Ping. https://github.com/llvm/llvm-project/pull/69867 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f0535c7 - [Driver] Check crt* when shared linking on OpenBSD

2023-11-04 Thread Brad Smith via cfe-commits
Author: Brad Smith Date: 2023-11-04T21:11:21-04:00 New Revision: f0535c72bf574fe4c5a46925670591e79ce39959 URL: https://github.com/llvm/llvm-project/commit/f0535c72bf574fe4c5a46925670591e79ce39959 DIFF: https://github.com/llvm/llvm-project/commit/f0535c72bf574fe4c5a46925670591e79ce39959.diff

[libcxx] [clang-tools-extra] [llvm] [libc] [clang] [compiler-rt] [flang] [libc++] Implement ranges::iota (PR #68494)

2023-11-04 Thread James E T Smith via cfe-commits
jamesETsmith wrote: @philnik777, I think this is ready to go. Let me know if there's anything else you'd like me to change https://github.com/llvm/llvm-project/pull/68494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 730d313 - [CGObjC] Remove no-op ptr-to-ptr bitcasts (NFC)

2023-11-04 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-04T19:59:39-05:00 New Revision: 730d313041f73760aacc3fa3b12b5b5b0c92a12c URL: https://github.com/llvm/llvm-project/commit/730d313041f73760aacc3fa3b12b5b5b0c92a12c DIFF: https://github.com/llvm/llvm-project/commit/730d313041f73760aacc3fa3b12b5b5b0c92a12c.diff

[clang] 9e90027 - [CGException] Remove no-op ptr-to-ptr bitcasts (NFC)

2023-11-04 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2023-11-04T19:17:21-05:00 New Revision: 9e90027d618687f3d744e21ad3eda5735a167503 URL: https://github.com/llvm/llvm-project/commit/9e90027d618687f3d744e21ad3eda5735a167503 DIFF: https://github.com/llvm/llvm-project/commit/9e90027d618687f3d744e21ad3eda5735a167503.diff

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-11-04 Thread Richard Dzenis via cfe-commits
@@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33 -std=c++20 -verify %s +// expected-no-diagnostics + +[[msvc::constexpr]] int log2(int x) { [[msvc::constexpr]] return x > 1 ? 1 + log2(x / 2) : 0; } +constexpr bool test_log2() {

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-11-04 Thread Richard Dzenis via cfe-commits
https://github.com/RIscRIpt edited https://github.com/llvm/llvm-project/pull/71300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-11-04 Thread Richard Dzenis via cfe-commits
RIscRIpt wrote: Discussion initiated by @AaronBallman of one of important design decisions, which was forgotten (?): > @AaronBallman: > It's a good question as to whether we want to support that only when passing > `-fms-extensions` or not (it seems like a generally useful attribute); we >

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-11-04 Thread Richard Dzenis via cfe-commits
RIscRIpt wrote: Initially I replicated semantics of `[[msvc::constexpr]]` from MSVC, so that it was possible to use it the same way as in MSVC, even `[[msvc::constexpr]] return ::new` from non-std namespace. E.g. https://godbolt.org/z/7eKh5Envz ```cpp // RUN: %clang_cc1 -fms-compatibility

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-11-04 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. As per agreement, migrating to Github: https://github.com/llvm/llvm-project/pull/71300 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Richard Dzenis (RIscRIpt) Changes As per agreement with @AaronBallman and @erichkeane, I am re-opening this patch here. The current version of the patch has undergone numerous revisions before it became the version I am sending

[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)

2023-11-04 Thread Richard Dzenis via cfe-commits
https://github.com/RIscRIpt created https://github.com/llvm/llvm-project/pull/71300 As per agreement with @AaronBallman and @erichkeane, I am re-opening this patch here. The current version of the patch has undergone numerous revisions before it became the version I am sending to GitHub.

[clang] bceb6a1 - [StaticAnalyzer] Fix -Wunused-variable in SVals.h (NFC)

2023-11-04 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2023-11-05T07:40:44+08:00 New Revision: bceb6a1f2e141be6ed66fa382ee280c2644174fd URL: https://github.com/llvm/llvm-project/commit/bceb6a1f2e141be6ed66fa382ee280c2644174fd DIFF: https://github.com/llvm/llvm-project/commit/bceb6a1f2e141be6ed66fa382ee280c2644174fd.diff LOG:

[clang] [Clang][Driver][LTO] Fix empty stats filename when in LTO mode (PR #71197)

2023-11-04 Thread Fangrui Song via cfe-commits
@@ -20,6 +20,8 @@ // CHECK-INVALID: invalid value 'bla' in '-save-stats=bla' // RUN: %clang -target x86_64-linux-unknown -save-stats -flto -o obj/dir/save-stats.exe %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-LTO +// Previously `-plugin-opt=stats-file` would use empty

[clang] [Clang][Driver][LTO] Fix empty stats filename when in LTO mode (PR #71197)

2023-11-04 Thread Fangrui Song via cfe-commits
@@ -535,7 +535,15 @@ void tools::gnutools::Linker::ConstructJob(Compilation , const JobAction , if (D.isUsingLTO()) { assert(!Inputs.empty() && "Must have at least one input."); -addLTOOptions(ToolChain, Args, CmdArgs, Output, Inputs[0], +// Find the first

[clang] [Clang][Driver][LTO] Fix empty stats filename when in LTO mode (PR #71197)

2023-11-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/71197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Driver][LTO] Fix empty stats filename when in LTO mode (PR #71197)

2023-11-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/71197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [llvm] [clang] [mlir] [flang] [ELF] Merge exportDynamic into versionId (PR #71272)

2023-11-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/71272 >From e6a9f8c08ddab444f581a18c0d3c2ad242448e7c Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 3 Nov 2023 14:48:13 -0700 Subject: [PATCH 1/2] [ELF] Merge exportDynamic into versionId For a Defined/Common

[libc] [clang] [libcxx] [flang] [llvm] [compiler-rt] [clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2023-11-04 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith updated https://github.com/llvm/llvm-project/pull/68494 >From c4a3ccfbad090ad8314aa8ad53092edc8d5432bc Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 28 Sep 2023 10:11:15 -0400 Subject: [PATCH 01/16] [libc++] Implement ranges::iota and

[libc] [clang] [libcxx] [flang] [llvm] [compiler-rt] [clang-tools-extra] [libc++] Implement ranges::iota (PR #68494)

2023-11-04 Thread James E T Smith via cfe-commits
https://github.com/jamesETsmith updated https://github.com/llvm/llvm-project/pull/68494 >From c4a3ccfbad090ad8314aa8ad53092edc8d5432bc Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 28 Sep 2023 10:11:15 -0400 Subject: [PATCH 01/16] [libc++] Implement ranges::iota and

[PATCH] D134458: [AST] Add C++11 attribute 'msvc::no_unique_address'

2023-11-04 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. Abandoning due to lack of time and expertise. I might come back and tackle it in several months. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134458/new/

[clang] [Clang][CodeGen] Stoping emitting alignment assumes for `align_{up,down}` (PR #71295)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (goldsteinn) Changes Now that `align_{up,down}` use `llvm.ptrmask` (as of #71238), the assume doesn't preserve any information that is not still easily re-computable. --- Full diff:

[clang] [Clang][CodeGen] Stoping emitting alignment assumes for `align_{up,down}` (PR #71295)

2023-11-04 Thread via cfe-commits
https://github.com/goldsteinn created https://github.com/llvm/llvm-project/pull/71295 Now that `align_{up,down}` use `llvm.ptrmask` (as of #71238), the assume doesn't preserve any information that is not still easily re-computable. >From c2e64a4d6a6800b29b04b05e1386dff0dfba3211 Mon Sep 17

[compiler-rt] [flang] [libcxx] [clang] [openmp] [llvm] [clang-tools-extra] [lldb] [OpenMP] Add memory diff dump for kernel record-replay (PR #70667)

2023-11-04 Thread via cfe-commits
https://github.com/nmustakin updated https://github.com/llvm/llvm-project/pull/70667 >From 153c6d812939cd23bb71e53c71378117ed5b23c7 Mon Sep 17 00:00:00 2001 From: Nafis Mustakin Date: Mon, 30 Oct 2023 07:50:59 -0700 Subject: [PATCH 1/5] Add memory diff dump for kernel record-replay ---

[clang] 2414e5c - [Serialization] Fix warnings

2023-11-04 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-11-04T12:24:06-07:00 New Revision: 2414e5cb9efa289b841bb814d20c7eb6f355fa4d URL: https://github.com/llvm/llvm-project/commit/2414e5cb9efa289b841bb814d20c7eb6f355fa4d DIFF: https://github.com/llvm/llvm-project/commit/2414e5cb9efa289b841bb814d20c7eb6f355fa4d.diff

[clang] 71be514 - [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down`

2023-11-04 Thread Noah Goldstein via cfe-commits
Author: Noah Goldstein Date: 2023-11-04T14:20:54-05:00 New Revision: 71be514fa0af996745186816735d69fa8a26f3c9 URL: https://github.com/llvm/llvm-project/commit/71be514fa0af996745186816735d69fa8a26f3c9 DIFF:

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-04 Thread via cfe-commits
https://github.com/goldsteinn closed https://github.com/llvm/llvm-project/pull/71238 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [flang] [lldb] [clang] [IndVars] Add check of loop invariant for trunc instructions (PR #71072)

2023-11-04 Thread Markos Horro via cfe-commits
https://github.com/markoshorro edited https://github.com/llvm/llvm-project/pull/71072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [flang] [lldb] [clang] [IndVars] Add check of loop invariant for trunc instructions (PR #71072)

2023-11-04 Thread Markos Horro via cfe-commits
@@ -0,0 +1,28 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +; RUN: opt < %s -passes=indvars -S | FileCheck %s + +declare void @foo(i16 noundef) + +; Function Attrs: mustprogress noreturn uwtable +define void @bar(i64 noundef %ptr) { +;

[llvm] [clang] [AArch64] Stack probing for dynamic allocas in SelectionDAG (PR #66525)

2023-11-04 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: Ping? https://github.com/llvm/llvm-project/pull/66525 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang][AArch64] Pass down stack clash protection options to LLVM/Backend (PR #68993)

2023-11-04 Thread Momchil Velikov via cfe-commits
momchil-velikov wrote: Ping? https://github.com/llvm/llvm-project/pull/68993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Verifier] Check function attributes related to branch protection (NFC) (PR #70565)

2023-11-04 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/70565 >From eb47903ad47f4a9e833948424a1c88bc2c72090e Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Sat, 28 Oct 2023 15:01:36 +0100 Subject: [PATCH 1/4] [Verifier] Check function attributes related to

[llvm] [clang] [RISCV] Use BF16 in Xsfvfwmaccqqq intrinsics (PR #71140)

2023-11-04 Thread Yueh-Ting Chen via cfe-commits
eopXD wrote: Approval is upon addressing Craig's comment. https://github.com/llvm/llvm-project/pull/71140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Use BF16 in Xsfvfwmaccqqq intrinsics (PR #71140)

2023-11-04 Thread Yueh-Ting Chen via cfe-commits
https://github.com/eopXD approved this pull request. Sorry I did not do this before you. The patch looks good, I would say we also need tuples of bf16 for completeness. But I will be adding a suite of intrinsics around BFloat16 (https://github.com/riscv-non-isa/rvv-intrinsic-doc/pull/293) so

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-04 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/71238 >From 7df7db58bd40e1da8805542abf0a9c6e6396d068 Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Fri, 3 Nov 2023 16:45:46 -0500 Subject: [PATCH] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and

[clang] [analyzer][solver] On SymSym RelOps, check EQClass members for contradictions (PR #71284)

2023-11-04 Thread Balazs Benics via cfe-commits
steakhal wrote: For crossreference: I raised some related questions around having void casts artificially keeping constraints and symbols alive at discuss: https://discourse.llvm.org/t/range-based-solver-and-eager-symbol-garbage-collection/74670 https://github.com/llvm/llvm-project/pull/71284

[llvm] [clang] [AArch64] Add quadword gather load/scatter store intrinsics with unscaled vector offset (PR #71290)

2023-11-04 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 1bb48c440b9299d251ec47d220f1c3a8db523041 86954b958eff74c2b16b892ac2523d5c300ce897 --

[llvm] [clang] [AArch64] Add quadword gather load/scatter store intrinsics with unscaled vector offset (PR #71290)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes This patch add intrinsics of the form svtype_t svld1q_gather_u64offset_typ(svbool_t pg, const type_t *base, svuint64_t offs); void svst1q_scatter_u64offset_typ(sbvool_t, type_t

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-04 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 e6bd68c90b1a386e276f53ba28fdfdfda48bcea1 a3b7e136e2f045a1c9948b679da89ec9a406516e --

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-04 Thread Momchil Velikov via cfe-commits
@@ -9671,28 +9677,47 @@ Value *CodeGenFunction::EmitSVEMaskedLoad(const CallExpr *E, // The vector type that is returned may be different from the // eventual type loaded from memory. auto VectorTy = cast(ReturnTy); - auto MemoryTy =

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-04 Thread Momchil Velikov via cfe-commits
@@ -2614,6 +2619,37 @@ def int_aarch64_sve_ld1_pn_x4 : SVE2p1_Load_PN_X4_Intrinsic; def int_aarch64_sve_ldnt1_pn_x2 : SVE2p1_Load_PN_X2_Intrinsic; def int_aarch64_sve_ldnt1_pn_x4 : SVE2p1_Load_PN_X4_Intrinsic; +// +// SVE2.1 - Contiguous loads to quadword (single vector) +//

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-04 Thread Momchil Velikov via cfe-commits
@@ -9702,17 +9727,34 @@ Value *CodeGenFunction::EmitSVEMaskedStore(const CallExpr *E, auto VectorTy = cast(Ops.back()->getType()); auto MemoryTy = llvm::ScalableVectorType::get(MemEltTy, VectorTy); - Value *Predicate = EmitSVEPredicateCast(Ops[0], MemoryTy); + auto

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-04 Thread Momchil Velikov via cfe-commits
@@ -2614,6 +2619,37 @@ def int_aarch64_sve_ld1_pn_x4 : SVE2p1_Load_PN_X4_Intrinsic; def int_aarch64_sve_ldnt1_pn_x2 : SVE2p1_Load_PN_X2_Intrinsic; def int_aarch64_sve_ldnt1_pn_x4 : SVE2p1_Load_PN_X4_Intrinsic; +// +// SVE2.1 - Contiguous loads to quadword (single vector) +//

[llvm] [clang] [AArch64][SVE2.1] Add intrinsics for quadword loads/stores with unscaled offset (PR #70474)

2023-11-04 Thread Momchil Velikov via cfe-commits
@@ -9671,28 +9677,47 @@ Value *CodeGenFunction::EmitSVEMaskedLoad(const CallExpr *E, // The vector type that is returned may be different from the // eventual type loaded from memory. auto VectorTy = cast(ReturnTy); - auto MemoryTy =

[clang] [AArch64] Cast predicate operand of SVE gather loads/scater stores to the parameter type of the intrinsic (NFC) (PR #71289)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Momchil Velikov (momchil-velikov) Changes When emitting LLVM IR for gather loads/scatter stores, the predicate parameter is cast to a type that depends on the loaded, resp. stored type. That's correct for operation where we have

[clang] [AArch64] Cast predicate operand of SVE gather loads/scater stores to the parameter type of the intrinsic (NFC) (PR #71289)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Momchil Velikov (momchil-velikov) Changes When emitting LLVM IR for gather loads/scatter stores, the predicate parameter is cast to a type that depends on the loaded, resp. stored type. That's correct for operation where we have a

[clang] [AArch64] Cast predicate operand of SVE gather loads/scater stores to the parameter type of the intrinsic (NFC) (PR #71289)

2023-11-04 Thread Momchil Velikov via cfe-commits
https://github.com/momchil-velikov created https://github.com/llvm/llvm-project/pull/71289 When emitting LLVM IR for gather loads/scatter stores, the predicate parameter is cast to a type that depends on the loaded, resp. stored type. That's correct for operation where we have a predicate per

[llvm] [clang-tools-extra] [openmp] [clang] [libcxx] [lldb] [compiler-rt] [flang] [OpenMP] Add memory diff dump for kernel record-replay (PR #70667)

2023-11-04 Thread Giorgis Georgakoudis via cfe-commits
@@ -151,6 +151,74 @@ struct RecordReplayTy { OS.close(); } + void dumpDeviceMemoryDiff(StringRef Filename) { +ErrorOr> DeviceMemoryMB = +WritableMemoryBuffer::getNewUninitMemBuffer(MemorySize); +if (!DeviceMemoryMB) + report_fatal_error("Error

[compiler-rt] [openmp] [clang] [flang] [llvm] [lldb] [libcxx] [clang-tools-extra] [OpenMP] Add memory diff dump for kernel record-replay (PR #70667)

2023-11-04 Thread Giorgis Georgakoudis via cfe-commits
@@ -151,6 +151,74 @@ struct RecordReplayTy { OS.close(); } + void dumpDeviceMemoryDiff(StringRef Filename) { +ErrorOr> DeviceMemoryMB = +WritableMemoryBuffer::getNewUninitMemBuffer(MemorySize); +if (!DeviceMemoryMB) + report_fatal_error("Error

[lldb] [openmp] [compiler-rt] [clang] [libcxx] [clang-tools-extra] [llvm] [flang] [OpenMP] Add memory diff dump for kernel record-replay (PR #70667)

2023-11-04 Thread Giorgis Georgakoudis via cfe-commits
@@ -151,6 +151,74 @@ struct RecordReplayTy { OS.close(); } + void dumpDeviceMemoryDiff(StringRef Filename) { +ErrorOr> DeviceMemoryMB = +WritableMemoryBuffer::getNewUninitMemBuffer(MemorySize); +if (!DeviceMemoryMB) + report_fatal_error("Error

[libcxx] [clang] [compiler-rt] [clang-tools-extra] [flang] [lldb] [openmp] [llvm] [OpenMP] Add memory diff dump for kernel record-replay (PR #70667)

2023-11-04 Thread Giorgis Georgakoudis via cfe-commits
https://github.com/ggeorgakoudis edited https://github.com/llvm/llvm-project/pull/70667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [compiler-rt] [libcxx] [clang-tools-extra] [openmp] [lldb] [flang] [OpenMP] Add memory diff dump for kernel record-replay (PR #70667)

2023-11-04 Thread Giorgis Georgakoudis via cfe-commits
https://github.com/ggeorgakoudis requested changes to this pull request. https://github.com/llvm/llvm-project/pull/70667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/71039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] bde5717 - [analyzer][NFC] Rework SVal kind representation (#71039)

2023-11-04 Thread via cfe-commits
Author: Balazs Benics Date: 2023-11-04T15:26:59+01:00 New Revision: bde5717d4638c27614d9d4a2e53df27087a69841 URL: https://github.com/llvm/llvm-project/commit/bde5717d4638c27614d9d4a2e53df27087a69841 DIFF: https://github.com/llvm/llvm-project/commit/bde5717d4638c27614d9d4a2e53df27087a69841.diff

[clang] [analyzer][NFC] Rework SVal kind representation (PR #71039)

2023-11-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/71039 >From 8f16d3000a91df33d416dd09381175ddeb7e5ed3 Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Sat, 4 Nov 2023 15:25:42 +0100 Subject: [PATCH] [analyzer][NFC] Rework SVal kind representation The goal of

[clang] [analyzer][solver] On SymSym RelOps, check EQClass members for contradictions (PR #71284)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes The idea is that if we see a `X RELOP Y` being constrained to a RangeSet `S`, then check the eqclasses of X and Y respectively and for `X' RELOP Y'` SymSymExprs and try to infer their

[clang] [analyzer][solver] On SymSym RelOps, check EQClass members for contradictions (PR #71284)

2023-11-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/71284 The idea is that if we see a `X RELOP Y` being constrained to a RangeSet `S`, then check the eqclasses of X and Y respectively and for `X' RELOP Y'` SymSymExprs and try to infer their ranges. If there is no

[clang-tools-extra] [llvm] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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-tools-extra] [clang] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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] [clang-tools-extra] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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-tools-extra] [llvm] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: Could you please update the patch description with some information on what kind of normalization the pass does? It would also be great to post some examples, because I don't really get what kind of renaming and reordering this does just looking at the test

[clang] [llvm] [clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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] [clang] [clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -543,6 +543,14 @@ variables with initializers are marked as internal. An interprocedural variant of :ref:`Sparse Conditional Constant Propagation `. +``ir-normalizer``: Transforms IR into a canonical form that's easier to diff nikic wrote: Looks like

[clang] [llvm] [clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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] [clang] [clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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] [clang-tools-extra] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,637 @@ +//===--- IRNormalizer.cpp - IR Normalizer ---===// +// +// 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-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-04 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 cd6022916bff1d6fab007b554810b631549ba43c d73a8e2ee683e6812c21cb1de7363b14565a96d1 --

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/71279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Younan Zhang (zyn0217) Changes This is an enhancement to the HeuristicResolver, trying to extract the deduced type from the single instantiation for a template. This partially addresses the point #1 from

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-04 Thread Younan Zhang via cfe-commits
@@ -46,6 +50,98 @@ const Type *resolveDeclsToType(const std::vector , return nullptr; } +// Visitor that helps to extract deduced type from instantiated entities. +// This merely performs the source location comparison against each Decl +// until it finds a Decl with the

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-04 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/71279 This is an enhancement to the HeuristicResolver, trying to extract the deduced type from the single instantiation for a template. This partially addresses the point #1 from

[llvm] [clang] [clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-04 Thread Michal Paszkowski via cfe-commits
https://github.com/michalpaszkowski approved this pull request. Thank you for working on this! LGTM! https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] cd60229 - [clang][NFC] Refactor `ConstantExpr::ResultStorageKind`

2023-11-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T13:28:29+03:00 New Revision: cd6022916bff1d6fab007b554810b631549ba43c URL: https://github.com/llvm/llvm-project/commit/cd6022916bff1d6fab007b554810b631549ba43c DIFF:

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-04 Thread Amirreza Ashouri via cfe-commits
AMP999 wrote: @cor3ntin Are these tests what you had in mind? Are they sufficient? What else should I add? https://github.com/llvm/llvm-project/pull/69734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Non-object types are non-trivially relocatable (PR #69734)

2023-11-04 Thread Amirreza Ashouri via cfe-commits
https://github.com/AMP999 updated https://github.com/llvm/llvm-project/pull/69734 >From a67c7b8f2af625145c805240fc51f1ecea392ef2 Mon Sep 17 00:00:00 2001 From: Amirreza Ashouri Date: Sat, 7 Oct 2023 15:18:55 +0330 Subject: [PATCH] [clang] Non-object types are non-trivially relocatable Both

[clang] 51d15d1 - [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (#70837)

2023-11-04 Thread via cfe-commits
Author: Balazs Benics Date: 2023-11-04T11:11:24+01:00 New Revision: 51d15d13dea4325d1f76353af847d9de0b532e87 URL: https://github.com/llvm/llvm-project/commit/51d15d13dea4325d1f76353af847d9de0b532e87 DIFF: https://github.com/llvm/llvm-project/commit/51d15d13dea4325d1f76353af847d9de0b532e87.diff

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-11-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/70837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-04 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 558007. koops added a comment. 1. Removing the Create methods from OMPFailClause class. 2. checkFailClauseParameters removed and the checking is now done in ActOnOpenMPAtomicDirective() itself. CHANGES SINCE LAST ACTION

[clang] 99e7e7a - [clang][NFC] Refactor `SourceLocExpr::IdentKind`

2023-11-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T12:43:26+03:00 New Revision: 99e7e7a597fa4ebaa8ebacdc42eae9f0b976f54c URL: https://github.com/llvm/llvm-project/commit/99e7e7a597fa4ebaa8ebacdc42eae9f0b976f54c DIFF:

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-11-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal updated https://github.com/llvm/llvm-project/pull/70837 >From 2de19fc8e14319674ce87c18771ba1b8ba22f79b Mon Sep 17 00:00:00 2001 From: Balazs Benics Date: Mon, 23 Oct 2023 18:10:29 +0200 Subject: [PATCH 1/3] [analyzer] Fix assertion failure in

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-11-04 Thread Balazs Benics via cfe-commits
@@ -30,3 +30,24 @@ void test(int i) { clang_analyzer_dump(g4); // expected-warning@-1 {{ [as 64 bit integer]}} } + +struct A { + int n; + void set(int x) { +n = x; + } +}; +using ptr_size = decltype(sizeof(void *)); steakhal wrote: Fixed. Now using

[clang] [analyzer] Fix assertion failure in `CXXInstanceCall::getCXXThisVal` (PR #70837)

2023-11-04 Thread Balazs Benics via cfe-commits
@@ -30,3 +30,24 @@ void test(int i) { clang_analyzer_dump(g4); // expected-warning@-1 {{ [as 64 bit integer]}} } + +struct A { + int n; + void set(int x) { +n = x; + } +}; +using ptr_size = decltype(sizeof(void *)); +void gh_69922(ptr_size p) { + //

[clang] [Clang][CodeGen] Emit `llvm.ptrmask` for `align_up` and `align_down` (PR #71238)

2023-11-04 Thread Markus Böck via cfe-commits
@@ -19671,41 +19671,38 @@ RValue CodeGenFunction::EmitBuiltinIsAligned(const CallExpr *E) { /// TODO: actually use ptrmask once most optimization passes know about it. zero9178 wrote: Can this TODO be removed now?

[clang] 5b9d793 - [clang][NFC] Annotate Expr-related headers with `preferred_type`

2023-11-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T09:23:50+03:00 New Revision: 5b9d793290c187aee4e63b61d4a12c3766f7cfe6 URL: https://github.com/llvm/llvm-project/commit/5b9d793290c187aee4e63b61d4a12c3766f7cfe6 DIFF:

[clang] c4b2d33 - [clang][NFC] Annotate 2 leftover bit-fields in `Type.h` with `preferred_type`

2023-11-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-11-04T08:58:57+03:00 New Revision: c4b2d338cc450ff4499fd062cd9261bea55808a1 URL: https://github.com/llvm/llvm-project/commit/c4b2d338cc450ff4499fd062cd9261bea55808a1 DIFF: