[clang] [llvm] [fatlto] Add coroutine passes when using FatLTO with ThinLTO (PR #134434)

2025-04-10 Thread Vitaly Buka via cfe-commits
@@ -1692,6 +1692,19 @@ PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, if (ThinLTO && PGOOpt && PGOOpt->Action == PGOOptions::SampleUse) MPM.addPass(buildThinLTODefaultPipeline(Level, /*ImportSummary=*/nullptr)); else { +// ModuleSimp

[clang] [sanitizer] Apply AlwaysIn/Out in parseSanitizeArgs (PR #129405)

2025-04-10 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/129405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] [sanitizer] predict trap checks succeed (PR #134310)

2025-04-10 Thread Vitaly Buka via cfe-commits
@@ -41,31 +41,31 @@ void caller(void (*f)(void)) { // CHECK: [[CONT1]]: // CHECK: %[[NOT_1:.*]] = icmp ne i8 %[[KIND]], 1 -// CHECK: br i1 %[[NOT_1]], label %[[CONT2:.*]], label %[[HANDLE1:.*]], !nosanitize +// CHECK: br i1 %[[NOT_1]], label %[[CONT2:.*]], label %[[HAND

[clang] [cfi][NFCI] Precommit tests to show nomerge functionality (PR #135104)

2025-04-09 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/135104 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [fatlto] Add coroutine passes when using FatLTO with ThinLTO (PR #134434)

2025-04-08 Thread Vitaly Buka via cfe-commits
@@ -1692,6 +1692,19 @@ PassBuilder::buildFatLTODefaultPipeline(OptimizationLevel Level, bool ThinLTO, if (ThinLTO && PGOOpt && PGOOpt->Action == PGOOptions::SampleUse) MPM.addPass(buildThinLTODefaultPipeline(Level, /*ImportSummary=*/nullptr)); else { +// ModuleSimp

[clang] [NFC] [clang] rename InlinedTrapFuncMap to InlinedSubprogramMap (PR #132993)

2025-03-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/132993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer][CFI] Add support to build CFI with sanitize-coverage (PR #131296)

2025-03-15 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/131296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-03-01 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/121115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-28 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
@@ -214,13 +214,14 @@ Available checks are: the wrong dynamic type, or that its lifetime has not begun or has ended. Incompatible with ``-fno-rtti``. Link must be performed by ``clang++``, not ``clang``, to make sure C++-specific parts of the runtime library and

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-25 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [libclang] Replace createRef with createDup (PR #126683)

2025-02-25 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Requesting changes just to be sure none of the changes from `createRef()` to > `createDup()` would have generated a `StringRef` holding a null pointer. I'd > be surprised if they did, but a second set of eyes would be helpful. I am not sure how to proceed here. This change

[clang] [llvm] Reapply "Reland "[HLSL] Implement the `reflect` HLSL function"" (#124046) (PR #128386)

2025-02-24 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/128386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-23 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @AaronBallman @zygoloid Looks like we agree on https://discourse.llvm.org/t/rfc-remove-vptr-from-undefined/83830 So I'd like to merge this patch this week. https://github.com/llvm/llvm-project/pull/121115 ___ cfe-commits mailing lis

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-23 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. LGTM regarding previous HWASAN crash, which is gone https://github.com/llvm/llvm-project/pull/125599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [llvm] Reapply "Reland "[HLSL] Implement the `reflect` HLSL function"" (#124046) (PR #128386)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka converted_to_draft https://github.com/llvm/llvm-project/pull/128386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-22 Thread Vitaly Buka via cfe-commits
@@ -1,6 +1,5 @@ -; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o /dev/null 2>&1 | FileCheck %s -; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o /dev/null 2>&1 | FileCheck %s -; UNSUPPORTED: hwasan +; RUN: not llc -v

[clang] [llvm] Reapply "Reland "[HLSL] Implement the `reflect` HLSL function"" (#124046) (PR #128386)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/128386 This reverts commit 0fe8e70c6609ff86cd40fbb45a85a8ed04c153c2. >From 37bc44832ab10781b467c9b4a9e62af594305534 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Sat, 22 Feb 2025 17:38:18 -0800 Subject: [PATCH] =

[clang] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/128372 In #123003 make_first_range was applied to temporarily. >From d3384dec3f6aa0e3d9d6585f8b2553dfcff2d579 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Sat, 22 Feb 2025 13:32:12 -0800 Subject: [PATCH] =?UTF

[clang] [analyzer] Allow overriding Unknown memspaces using a ProgramState trait (PR #123003)

2025-02-22 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Should be fixed with #128372 https://github.com/llvm/llvm-project/pull/123003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Fix use after scope after #123003 (PR #128372)

2025-02-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/128372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Allow overriding Unknown memspaces using a ProgramState trait (PR #123003)

2025-02-22 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Use after scope: https://lab.llvm.org/buildbot/#/builders/169/builds/8735 https://lab.llvm.org/buildbot/#/builders/94/builds/4653/steps/17/logs/stdio https://github.com/llvm/llvm-project/pull/123003 ___ cfe-commits mailing list cfe-c

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-02-20 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/119387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-02-20 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/119387 >From 8781ff2355750ae61d140620b1f6862537de07e3 Mon Sep 17 00:00:00 2001 From: gbMattN Date: Tue, 10 Dec 2024 15:01:37 + Subject: [PATCH 01/11] [ASan] Add metadata to renamed instructions so ASan doesn't

[clang] f7a10f0 - [Index] Un-XFAIL test with msan

2025-02-20 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2025-02-20T09:41:00-08:00 New Revision: f7a10f0e8d46085cfebfbd53c3ab19a5ab37774f URL: https://github.com/llvm/llvm-project/commit/f7a10f0e8d46085cfebfbd53c3ab19a5ab37774f DIFF: https://github.com/llvm/llvm-project/commit/f7a10f0e8d46085cfebfbd53c3ab19a5ab37774f.diff L

[clang] Reland "[libclang] Always Dup in createRef(StringRef)" (PR #127078)

2025-02-20 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: @fmayer Looks like my patch exposed another UAF https://lab.llvm.org/buildbot/#/builders/169/builds/8637 Looking, and will revert if there is no quick fix https://github.com/llvm/llvm-project/pull/127078 ___ cfe-commits mailing list

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-19 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: >From this patch? https://lab.llvm.org/buildbot/#/builders/72/builds/8380 FYI @fmayer https://github.com/llvm/llvm-project/pull/126750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [clang] fix use after free in clang/tools/c-index-test/c-index-test.c (PR #127063)

2025-02-18 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > @metaflow @vitalybuka I've checked in > [8f41d28](https://github.com/llvm/llvm-project/commit/8f41d28d89ee287d0f5a6518116ab316be2657b8) > to fix warnings. Thanks! Thank You! https://github.com/llvm/llvm-project/pull/127063 ___ cf

[clang] Reland "[libclang] Always Dup in createRef(StringRef)" (PR #127078)

2025-02-18 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/127078 >From a831b96cc2eb4b65e7157ee3cb519cf9b4a6af76 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 13 Feb 2025 07:42:46 -0800 Subject: [PATCH] Revert "Revert "[libclang] Always Dup in createRef(StringRef)"

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [libclang] Replace createRef with createDup (PR #126683)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/126683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Please add a release note so that users know about the fix and about the > expected performance costs, but otherwise LGTM done https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?

[clang] [Clang][CMake][MSVC] Install PDBs alongside executables (PR #126675)

2025-02-11 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Also this one is broken https://lab.llvm.org/buildbot/#/builders/107/builds/7929 cc @fmayer https://github.com/llvm/llvm-project/pull/126675 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -444,6 +444,19 @@ class LangOptionsBase { IncompleteOnly = 3, }; + enum class ArrayBoundsStrictFlexArraysLevelKind { vitalybuka wrote: We can do the same in cc1, the case will not be used, because driver will always pass something? BTW, why -1 doe

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -1192,13 +1193,40 @@ llvm::Value *CodeGenFunction::EmitLoadOfCountedByField( return nullptr; } +LangOptions::StrictFlexArraysLevelKind +CodeGenFunction::effectiveArrayBoundsFlexArraysLevel() { + using StrictFlexArraysLevelKind = LangOptions::StrictFlexArraysLevelKind; +

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -444,6 +444,19 @@ class LangOptionsBase { IncompleteOnly = 3, }; + enum class ArrayBoundsStrictFlexArraysLevelKind { vitalybuka wrote: any way to avoid None? and new enum completely? E.g. Driver copy from another flag if this one is missing? https

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -1192,13 +1193,40 @@ llvm::Value *CodeGenFunction::EmitLoadOfCountedByField( return nullptr; } +LangOptions::StrictFlexArraysLevelKind +CodeGenFunction::effectiveArrayBoundsFlexArraysLevel() { + using StrictFlexArraysLevelKind = LangOptions::StrictFlexArraysLevelKind; +

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -7,6 +7,16 @@ // RUN: %clang_cc1 -emit-llvm -triple x86_64 -fstrict-flex-arrays=2 -fsanitize=array-bounds -x c++ %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-STRICT-2,CXX // RUN: %clang_cc1 -emit-llvm -triple x86_64 -fstrict-flex-arrays=3 -fsanitize=array-bounds

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
@@ -444,6 +444,19 @@ class LangOptionsBase { IncompleteOnly = 3, }; + enum class ArrayBoundsStrictFlexArraysLevelKind { vitalybuka wrote: To match numerical values, less mental efforts for readers. ``` enum class ArrayBoundsStrictFlexArraysLevelKind

[clang] [sanitizer] [clang] Introduce fsanitize-bounds-strict-flex-arrays (PR #126163)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Usually our tweak flags looks like -fsanitize-- "bounds" is a group for (array-bounds + local-bounds) "undefined" is also group, but we already have -fsanitize-undefined-, but they kind of affect a few sanitizers so: `-fsanitize-undefined-strict-flex-arrays` or `-fsanitize-a

[clang] [clang-tools-extra] [flang] [lldb] [llvm] [mlir] [polly] Add static to command line option (cl::opt) (PR #126243)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: All these changes are independent and quite straight forward. I'd suggest to split in some way, so it's easier to review, land, and revert if we miss and break something. Maybe by component. also globals vs function local etc. https://github.com/llvm/llvm-project/pull/12624

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-07 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: ping https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2025-02-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka requested changes to this pull request. We should abandon this in favor of proper fixes One case is here https://github.com/llvm/llvm-project/pull/126168 Not sure about other cases of https://github.com/llvm/llvm-project/issues/104525. https://github.com/llvm/llvm

[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

2025-02-04 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: #104525 is still crashing, what we can do about that? https://github.com/llvm/llvm-project/pull/107153 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-03 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. for compiler-rt/lib/sanitizer_common/CMakeLists.txt https://github.com/llvm/llvm-project/pull/125388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [compiler-rt] [Sanitizers] the access size (8 bytes) exceeds the max lock-free size (4 bytes) for 32-bit (PR #125388)

2025-02-03 Thread Vitaly Buka via cfe-commits
@@ -239,6 +239,11 @@ append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570 append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG -Wglobal-constructors SANITIZER_CFLAGS) +# Suppress -Watomic-alignment warnings by not treating them as errors +if (C

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-03 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: ping https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Looks like from this patch https://lab.llvm.org/buildbot/#/builders/94/builds/4194/steps/17/logs/stdio https://github.com/llvm/llvm-project/pull/125253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Looks like from this patch > https://lab.llvm.org/buildbot/#/builders/94/builds/4194/steps/17/logs/stdio I see it's alread reverted and green. Still the URL with stack traces may help to fix the issue. https://github.com/llvm/llvm-project/pull/125253 ___

[clang] [clang][bytecode] Stack-allocate bottom function frame (PR #125253)

2025-01-31 Thread Vitaly Buka via cfe-commits
@@ -27,7 +27,7 @@ bool InterpState::inConstantContext() const { } InterpState::~InterpState() { - while (Current) { + while (Current && !Current->isBottomFrame()) { vitalybuka wrote: Some reordering is needed for "InterpState S;" and "InterpFrame BottomFram

[clang] [compiler-rt] [llvm] [ASan] Add metadata to renamed instructions so ASan doesn't use the i… (PR #119387)

2025-01-30 Thread Vitaly Buka via cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst *CodeGenFunction::CreateTempAlloca(llvm::Type *Ty, Alloca = new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(), ArraySize, Name, AllocaInsertPt->getIterator()); + if (Alloca->getName

[clang] Reapply "[ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass" (#125032) (PR #125037)

2025-01-30 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/125037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: It does not look nice for memory usage, but I don't know how critical it's here. It's it's unacceptable, then `__attribute__((no_sanitize("memory")))` is an option. https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mai

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef (PR #125020)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/125020 We can't guaranty that underlying string is 0-terminated and [String.size()] is even in the same allocation. >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: W

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/124857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,30 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + // SanitizeSkipHotCutoffs: doubles with range [0, 1] + // Opts.cutoffs: ints with range

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/124857 >From 68246540d28c765af1fe4d61244e35cc8ff723cc Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 01/15] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAll

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/124857 >From 68246540d28c765af1fe4d61244e35cc8ff723cc Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 01/14] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAll

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/124857 >From 68246540d28c765af1fe4d61244e35cc8ff723cc Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 01/13] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAll

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/124857 >From 68246540d28c765af1fe4d61244e35cc8ff723cc Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 01/12] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAll

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/124857 >From 68246540d28c765af1fe4d61244e35cc8ff723cc Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 01/11] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAll

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/124857 >From 68246540d28c765af1fe4d61244e35cc8ff723cc Mon Sep 17 00:00:00 2001 From: Thurston Dang Date: Wed, 22 Jan 2025 18:59:07 + Subject: [PATCH 01/10] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAll

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -43,6 +44,23 @@ std::optional SanitizerMaskCutoffs::operator[](unsigned Kind) const { void SanitizerMaskCutoffs::clear(SanitizerMask K) { set(K, 0); } +std::optional> +SanitizerMaskCutoffs::getAllScaled(int ScalingFactor) const { + std::vector scaledCutoffs; + + bool an

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,30 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + // SanitizeSkipHotCutoffs: doubles with range [0, 1] + // Opts.cutoffs: ints with range

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -43,6 +44,23 @@ std::optional SanitizerMaskCutoffs::operator[](unsigned Kind) const { void SanitizerMaskCutoffs::clear(SanitizerMask K) { set(K, 0); } +std::optional> +SanitizerMaskCutoffs::getAllScaled(int ScalingFactor) const { + std::vector scaledCutoffs; + + bool an

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,30 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + // SanitizeSkipHotCutoffs: doubles with range [0, 1] + // Opts.cutoffs: ints with range

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. With nits https://github.com/llvm/llvm-project/pull/124857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,30 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + // SanitizeSkipHotCutoffs: doubles with range [0, 1] + // Opts.cutoffs: ints with range

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,30 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + // SanitizeSkipHotCutoffs: doubles with range [0, 1] + // Opts.cutoffs: ints with range

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,30 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + // SanitizeSkipHotCutoffs: doubles with range [0, 1] + // Opts.cutoffs: ints with range

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -43,6 +44,23 @@ std::optional SanitizerMaskCutoffs::operator[](unsigned Kind) const { void SanitizerMaskCutoffs::clear(SanitizerMask K) { set(K, 0); } +std::optional> +SanitizerMaskCutoffs::getAllScaled(int ScalingFactor) const { + std::vector scaledCutoffs;

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-29 Thread Vitaly Buka via cfe-commits
@@ -43,6 +44,23 @@ std::optional SanitizerMaskCutoffs::operator[](unsigned Kind) const { void SanitizerMaskCutoffs::clear(SanitizerMask K) { set(K, 0); } +std::optional> +SanitizerMaskCutoffs::getAllScaled(int ScalingFactor) const { + std::vector scaledCutoffs; + + bool an

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-28 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,29 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + bool lowerAllowCheck = LowerAllowCheckPass::IsRequested(); + // Is there a non-zero cuto

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-28 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,29 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + bool lowerAllowCheck = LowerAllowCheckPass::IsRequested(); vitalybuka wr

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-28 Thread Vitaly Buka via cfe-commits
@@ -7,18 +10,26 @@ // CHECK-LABEL: define dso_local noundef i32 @div( // CHECK-SAME: i32 noundef [[X:%.*]], i32 noundef [[Y:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] { // CHECK-NEXT: [[ENTRY:.*:]] -// CHECK-NEXT:[[TMP0:%.*]] = icmp eq i32 [[Y]], 0, !nosanitize [[META2:

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-28 Thread Vitaly Buka via cfe-commits
@@ -3614,29 +3614,35 @@ void CodeGenFunction::EmitCheck( llvm::Value *RecoverableCond = nullptr; llvm::Value *TrapCond = nullptr; bool NoMerge = false; + // Expand checks into: + // (Check1 || !allow_ubsan_check) && (Check2 || !allow_ubsan_check) ... + // We need sep

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-28 Thread Vitaly Buka via cfe-commits
@@ -3614,29 +3614,35 @@ void CodeGenFunction::EmitCheck( llvm::Value *RecoverableCond = nullptr; llvm::Value *TrapCond = nullptr; bool NoMerge = false; + // Expand checks into: + // (Check1 || !allow_ubsan_check) && (Check2 || !allow_ubsan_check) ... + // We need sep

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-28 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,29 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + bool lowerAllowCheck = LowerAllowCheckPass::IsRequested(); + // Is there a non-zero cuto

[clang] [ubsan] Connect -fsanitize-skip-hot-cutoff to LowerAllowCheckPass (PR #124857)

2025-01-28 Thread Vitaly Buka via cfe-commits
@@ -795,12 +795,29 @@ static void addSanitizers(const Triple &TargetTriple, PB.registerOptimizerLastEPCallback(SanitizersCallback); } - if (LowerAllowCheckPass::IsRequested()) { + bool lowerAllowCheck = LowerAllowCheckPass::IsRequested(); + // Is there a non-zero cuto

[clang] [llvm] [BoundsChecking] Update ubsantrap to use GuardKind (PR #124613)

2025-01-28 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/124613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -2314,7 +2314,6 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, Opts.SanitizeSkipHotCutoffs = parseSanitizerWeightedKinds( "-fsanitize-skip-hot-cutoff=", Args.getAllArgValues(OPT_fsanitize_skip_hot_cutoff_EQ), Diags); - --

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -71,7 +72,8 @@ static void emitRemark(IntrinsicInst *II, OptimizationRemarkEmitter &ORE, static bool removeUbsanTraps(Function &F, const BlockFrequencyInfo &BFI, const ProfileSummaryInfo *PSI, - OptimizationRemarkEmi

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka approved this pull request. https://github.com/llvm/llvm-project/pull/124211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -828,11 +828,66 @@ parseLowerAllowCheckPassOptions(StringRef Params) { StringRef ParamName; std::tie(ParamName, Params) = Params.split(';'); -return make_error( -formatv("invalid LowerAllowCheck pass parameter '{0}' ", ParamName) -.str(), -

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -2,6 +2,14 @@ ; RUN: opt < %s -passes='function(lower-allow-check)' -S | FileCheck %s --check-prefixes=NOPROFILE ; RUN: opt < %s -passes='function(lower-allow-check)' -lower-allow-check-random-rate=0 -S | FileCheck %s --check-prefixes=NONE ; RUN: opt < %s -passes='function

[clang] [llvm] [ubsan] Parse and use in LowerAllowCheckPass (PR #124211)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -828,11 +828,66 @@ parseLowerAllowCheckPassOptions(StringRef Params) { StringRef ParamName; std::tie(ParamName, Params) = Params.split(';'); -return make_error( -formatv("invalid LowerAllowCheck pass parameter '{0}' ", ParamName) -.str(), -

[clang] [compiler-rt] [Clang] Make `-Wreturn-type` default to an error in all language modes (PR #123470)

2025-01-27 Thread Vitaly Buka via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_hwasan %s -o %t && %env_hwasan_opts=random_tags=1 %run %t +// RUN: %clang_hwasan -Wno-error=return-type %s -o %t && %env_hwasan_opts=random_tags=1 %run %t vitalybuka wrote: It should be fine to change HWASAN tests, it does nothing

  1   2   3   4   5   6   7   8   9   10   >