[clang] allow prefer 256 bit attribute target (PR #117092)

2024-12-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-12-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/117092 >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 20 Nov 2024 17:23:56 -0800 Subject: [PATCH 1/2] Rework attr-target-x86 test Rework the attr-target-x86 test

[clang] Rework attr-target-x86 test (PR #117091)

2024-12-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/117091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
MatzeB wrote: Note that this has the test changes from #117091 included. https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117091 Rework the attr-target-x86 test so the CHECK lines for the attributes are next to their corresponding `__attribute__`. >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117092 - Rework attr-target-x86 test - Allow prefer-256-bit for __attribute__((target)) >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 20 Nov 2024 17:23:56 -080

[clang] Remove optimization flags from clang codegen tests (PR #113714)

2024-10-28 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/113714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-28 Thread Matthias Braun via cfe-commits
MatzeB wrote: > I have always expected shuffles to be canonicalized to make the lowest mask > lane the first operand. I believe the AArch64 and Arm matching functions rely > on that at the moment. https://godbolt.org/z/1rr1E8v1K Thanks for pointing this out! So definitely cannot land the chang

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-25 Thread Matthias Braun via cfe-commits
@@ -1,7 +1,7 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 // REQUIRES: x86-registered-target -// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s --ch

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: > Please push the revised clang tests as a separate patch. Submitted #113714 for the test updates (still included here for "stacking") https://github.com/llvm/llvm-project/pull/113212 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: > This idea here makes sense, I guess, but I'm a little worried about > unexpected side-effects... not sure how reliably the backend handles commuted > masks, and I don't think we have any testing infrastructure that would catch > that sort of issue. Was wondering about this too

[clang] Remove optimization flags from clang codegen tests (PR #113714)

2024-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: Update clang tests separately as suggested in #113212 https://github.com/llvm/llvm-project/pull/113714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-21 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/113212 As shufflevector is effectively commutative we should apply the same logic as other commutative operations where we order the inputs by their `getComplexity()` value. This will put things like `undef`, `poison` an

[clang-tools-extra] [llvm] Full path names are used in several unittests instead of the binary name. Fix up the testcase failures (PR #107974)

2024-09-10 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB approved this pull request. https://github.com/llvm/llvm-project/pull/107974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] Full path names are used in several unittests instead of the binary name. Fix up the testcase failures (PR #107974)

2024-09-10 Thread Matthias Braun via cfe-commits
MatzeB wrote: Please provide additional context in your summary on how this happens. My understanding is that this is for a setup with linux binfmt-misc + qemu running aarch64 binaries on an x86 system. The fact that we end up with absolute pathnames in `argv[0]` may be a bug in qemu or binfmt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-08 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
MatzeB wrote: Explicitly disabling the `scan-build` tests on windows now. I think they weren't previously running there because of `REQUIRES: shell` anyway and as far as I can tell from the buildkite results it seems the `scan-build` does not work correctly on windows at the moment. https://g

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/7] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/6] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/6] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/5] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
@@ -1,4 +1,4 @@ -REQUIRES: shell +REQUIRES: perl MatzeB wrote: Seems there is `rm` but no `ls`: https://github.com/MatzeB/llvm-project/blob/5e5b18a31057f0d086ce9731d2b58aa70d55eef5/llvm/utils/lit/lit/TestRunner.py?plain=1#L714 https://github.com/llvm/llvm-proj

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/4] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/3] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/2] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
MatzeB wrote: I checked that: - scan-build tests run fine by default on my machine. - scan-build tests are skipped when using `cmake -DCMAKE_DISBALE_FIND_PACKAGE_Perl=ON ...`. https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing lis

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/91275 None >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH] Use cmake to find perl executable --- clang/CMakeLists.txt

[llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-01-30 Thread Matthias Braun via cfe-commits
MatzeB wrote: How does this relate to the existing `shouldOptimizeForSize(Function&)` and similar APIs which appear to provide similar functionality at a first glance. If they are the same, then we should have a plan in place to cleanup and only have one system afterwards, if there are importa

[llvm] [clang] [compiler-rt] [clang-tools-extra] [flang] [bpi] Reuse the AsmWriter's BB naming scheme (PR #73593)

2023-12-01 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB commented: Consider using `utils/update_analyze_test_checks.py` to create the check lines... https://github.com/llvm/llvm-project/pull/73593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [llvm] [flang] [clang-tools-extra] [compiler-rt] [bpi] Reuse the AsmWriter's BB naming scheme (PR #73593)

2023-12-01 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/73593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix finding instantiated decls for class template specializations during instantiation (PR #72346)

2023-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/72346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] Remove unused LoopInfo from InlineSpiller and SpillPlacement (NFC) (PR #71874)

2023-11-16 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/71874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] Remove unused LoopInfo from InlineSpiller and SpillPlacement (NFC) (PR #71874)

2023-11-16 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/71874 >From 3b502f8cc14456b325efc3017a4a114391284b37 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 19 Oct 2022 10:58:40 -0700 Subject: [PATCH 1/3] Remove unused LoopInfo from InlineSpiller and SpillPlacement

[clang] [llvm] [clang-tools-extra] Remove unused LoopInfo from InlineSpiller and SpillPlacement (NFC) (PR #71874)

2023-11-16 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/71874 >From 3b502f8cc14456b325efc3017a4a114391284b37 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 19 Oct 2022 10:58:40 -0700 Subject: [PATCH 1/2] Remove unused LoopInfo from InlineSpiller and SpillPlacement

[clang] [llvm] [clang-tools-extra] Remove unused LoopInfo from InlineSpiller and SpillPlacement (NFC) (PR #71874)

2023-11-16 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/71874 >From 3b502f8cc14456b325efc3017a4a114391284b37 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 19 Oct 2022 10:58:40 -0700 Subject: [PATCH] Remove unused LoopInfo from InlineSpiller and SpillPlacement ---

[clang] [compiler-rt] [clang-tools-extra] [llvm] Bfi precision (PR #66285)

2023-11-01 Thread Matthias Braun via cfe-commits
MatzeB wrote: Or put another way: Do you see regressions disappear with `-mllvm -cold-callsite-rel-freq=0` ? https://github.com/llvm/llvm-project/pull/66285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang-tools-extra] [llvm] [clang] [compiler-rt] Bfi precision (PR #66285)

2023-11-01 Thread Matthias Braun via cfe-commits
MatzeB wrote: Do you just see regression or also some wins? I don't know whether this is all stems from the `isColdCallSite` behavior, and not just the usual some things get better some things get worse situation you can easily have when inlining changes? https://github.com/llvm/llvm-project/

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/70094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB approved this pull request. Seems like a sensible backstop for slightly incorrect profile data leading to extreme branch weights. Added some nitpicks, either way LGTM https://github.com/llvm/llvm-project/pull/70094 ___ cfe-co

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang-tools-extra] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/70094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
@@ -636,9 +636,13 @@ static void updateBranchWeights(Instruction *Term, WeightInfo &Info) { MDB.createBranchWeights(Info.Weights)); for (auto [Idx, SubWeight] : enumerate(Info.SubWeights)) if (SubWeight != 0) - Info.Weights[Idx] = Info.Weights[Id

[clang] [LoopPeeling] Fix weights updating of peeled off branches (PR #70094)

2023-10-30 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB approved this pull request. Seems like a sensible backstop for slightly incorrect profile data leading to extreme branch weights. Added some nitpicks, either way LGTM https://github.com/llvm/llvm-project/pull/70094 ___ cfe-co

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-27 Thread Matthias Braun via cfe-commits
MatzeB wrote: And digging even deeper: - FWIW I noticed that I only used `clang -c` as benchmark previously, should have used `clang -c -O3` resulting in this: ``` Old-BFI: insn: 37,821,687,947 (baseline) New-BFI: insn: 38,133,312,923 +0.82% Old-BFI, no-cold: insn: 37,423,365

[clang] Bfi precision (PR #66285)

2023-10-27 Thread Matthias Braun via cfe-commits
MatzeB wrote: Some very ad-hoc benchmarking. Of clang compilation speed (measured in instructions as reported by valgrind/callgrind which I think somewhat matches the setup of nikic) compiling `sqlite3` of CTMark: Old-BFI (this PR reverted), New-BFI (this PR applied), no-cold (cold-callsite-r

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-27 Thread Matthias Braun via cfe-commits
MatzeB wrote: Not sure how this change could trigger leaks. Changing BFI here should mostly effect inlining decisions, basic block placement, register allocation. But it shouldn't change program behavior or memory operations... Will try to reproduce this test on my machine, to see if there's a

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: Seems this got introduced in https://reviews.llvm.org/D34312 with the rough idea that we shouldn't inline into parts of the code that `_builtin_expect(...)` deems unlikely. Which makes sense when you say it express it like this, but I guess numeric thresholds can go wrong... htt

[clang] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: Seems this got introduced in https://reviews.llvm.org/D34312 with the rough idea that we shouldn't inline into parts of the code that `_builtin_expect(...)` deems unlikely. Which makes sense when you say it express it like this, but I guess numeric thresholds can go wrong... htt

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: Also note that this 2% cold-code threshold is only applied in situation where no PGO data is available. So maybe we should just ignore this, given that without PGO data it just is often impossible for the compiler to make good inlining decisions... https://github.com/llvm/llvm-p

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: I think I traced the clang regression down to `InlineCostCallAnalyzer::isColdCallSite` returning `true` in more instances. It previously did not do that because of what feels more like an accidental loss of precision: The example I analyzed starts out as a single-block function

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-26 Thread Matthias Braun via cfe-commits
MatzeB wrote: So not sure if there is an easy fix for the regression. We should probably have some logic that scales all BFI values when inlining to better accomodate the new range of frequencies so we loose less precision by accident. Though that won't help with the regression at hand as that

[clang] Bfi precision (PR #66285)

2023-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: Oh so this isn't even a PGO enabled build, interesting... https://github.com/llvm/llvm-project/pull/66285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: Oh so this isn't even a PGO enabled build, interesting... https://github.com/llvm/llvm-project/pull/66285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Bfi precision (PR #66285)

2023-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: The internal services I tried here tended to slightly improve or stay neutral. We can revert, but could you please share some details on how your clang built / tested so I have a chance to address things and bring these changes back? https://github.com/llvm/llvm-project/pull/6628

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-05 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-05 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-05 Thread Matthias Braun via cfe-commits
MatzeB wrote: > There are two ways ProfileFuncRef can originate (ignoring copy constructions): > ... So you are saying there can be hashcode `ProfileFuncRef`s coming from the profile, but an `llvm::Function` would always produce a string `ProfileFuncRef`? > B - Whenever we lookup a ProflieFuncR

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-05 Thread Matthias Braun via cfe-commits
MatzeB wrote: > There are two ways ProfileFuncRef can originate (ignoring copy constructions): > ... So you are saying there can be hashcode `ProfileFuncRef`s coming from the profile, but an `llvm::Function` would always produce a string `ProfileFuncRef`? > B - Whenever we lookup a ProflieFuncR

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-05 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,215 @@ +//===--- ProfileFuncRef.h - Sample profile function reference ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -643,14 +648,11 @@ class SampleContext { uint64_t getHashCode() const { if (hasContext()) return hash_value(getContextFrames()); - -// For non-context function name, use its MD5 as hash value, so that it is -// consistent with the profile map's key. -

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/66164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -618,7 +623,7 @@ class SampleContext { void clearState(ContextStateMask S) { State &= (uint32_t)~S; } bool hasContext() const { return State != UnknownContext; } bool isBaseContext() const { return FullContext.size() == 1; } - StringRef getName() const { return Name;

[clang-tools-extra] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

2023-10-04 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,222 @@ +//===--- ProfileFuncRef.h - Sample profile function name ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2

[clang] f8431a0 - Avoid running optimization passes in frontend test

2023-09-11 Thread Matthias Braun via cfe-commits
Author: Matthias Braun Date: 2023-09-11T10:38:06-07:00 New Revision: f8431a0e4008db374dfb17a21119178fb960e334 URL: https://github.com/llvm/llvm-project/commit/f8431a0e4008db374dfb17a21119178fb960e334 DIFF: https://github.com/llvm/llvm-project/commit/f8431a0e4008db374dfb17a21119178fb960e334.diff

[clang] e00a8d0 - Fix codegen for coroutine with function-try-block

2023-03-30 Thread Matthias Braun via cfe-commits
Author: Matthias Braun Date: 2023-03-30T11:16:32-07:00 New Revision: e00a8d081d789cac606cf0749c332c4632132820 URL: https://github.com/llvm/llvm-project/commit/e00a8d081d789cac606cf0749c332c4632132820 DIFF: https://github.com/llvm/llvm-project/commit/e00a8d081d789cac606cf0749c332c4632132820.diff

[clang-tools-extra] c21378f - [clangd/index/remote]NFC: Adapt code to newer grpc/protobuf versions

2023-02-23 Thread Matthias Braun via cfe-commits
Author: Matthias Braun Date: 2023-02-23T11:26:41-08:00 New Revision: c21378f90a4442810adc4af924a83a9c222fdc51 URL: https://github.com/llvm/llvm-project/commit/c21378f90a4442810adc4af924a83a9c222fdc51 DIFF: https://github.com/llvm/llvm-project/commit/c21378f90a4442810adc4af924a83a9c222fdc51.diff

[clang] cafe50d - Explicitly initialize opaque pointer mode in CodeGenAction

2022-11-07 Thread Matthias Braun via cfe-commits
Author: Matthias Braun Date: 2022-11-07T12:31:28-08:00 New Revision: cafe50daf525971ffc3b8c5f2f6343d24e381384 URL: https://github.com/llvm/llvm-project/commit/cafe50daf525971ffc3b8c5f2f6343d24e381384 DIFF: https://github.com/llvm/llvm-project/commit/cafe50daf525971ffc3b8c5f2f6343d24e381384.diff

[clang] 850d53a - LTO: Decide upfront whether to use opaque/non-opaque pointer types

2022-06-01 Thread Matthias Braun via cfe-commits
Author: Matthias Braun Date: 2022-06-01T18:05:53-07:00 New Revision: 850d53a197f9ffbf5708b7bd795056335e81e9b7 URL: https://github.com/llvm/llvm-project/commit/850d53a197f9ffbf5708b7bd795056335e81e9b7 DIFF: https://github.com/llvm/llvm-project/commit/850d53a197f9ffbf5708b7bd795056335e81e9b7.diff

r314187 - CodeGenModule: Adapt to LLVM TargetLibraryInfo changes

2017-09-25 Thread Matthias Braun via cfe-commits
Author: matze Date: Mon Sep 25 19:37:23 2017 New Revision: 314187 URL: http://llvm.org/viewvc/llvm-project?rev=314187&view=rev Log: CodeGenModule: Adapt to LLVM TargetLibraryInfo changes Adapt to LLVM TargetLibraryInfo changes in r314185. See also https://reviews.llvm.org/D38106 and https://revi

r308071 - Try to fix modules build

2017-07-14 Thread Matthias Braun via cfe-commits
Author: matze Date: Fri Jul 14 17:29:25 2017 New Revision: 308071 URL: http://llvm.org/viewvc/llvm-project?rev=308071&view=rev Log: Try to fix modules build Module builds somehow report an ambiguity between clang::Diagnostic and clang::Tooling::Diagnostic. It seems as if one of the additional hea

r303478 - CodeGenModule: Always output wchar_size, check LLVM assumptions.

2017-05-19 Thread Matthias Braun via cfe-commits
Author: matze Date: Fri May 19 20:29:55 2017 New Revision: 303478 URL: http://llvm.org/viewvc/llvm-project?rev=303478&view=rev Log: CodeGenModule: Always output wchar_size, check LLVM assumptions. Re-commit r303463 now that LLVM is fixed and adjust some lit tests. llvm::TargetLibraryInfo needs t

r303474 - Revert "CodeGenModule: Always output wchar_size, check LLVM assumptions."

2017-05-19 Thread Matthias Braun via cfe-commits
Author: matze Date: Fri May 19 19:38:27 2017 New Revision: 303474 URL: http://llvm.org/viewvc/llvm-project?rev=303474&view=rev Log: Revert "CodeGenModule: Always output wchar_size, check LLVM assumptions." Let's revert this for now (and with it the assert()) to get the bots back to green until I

r303463 - CodeGenModule: Always output wchar_size, check LLVM assumptions.

2017-05-19 Thread Matthias Braun via cfe-commits
Author: matze Date: Fri May 19 17:37:15 2017 New Revision: 303463 URL: http://llvm.org/viewvc/llvm-project?rev=303463&view=rev Log: CodeGenModule: Always output wchar_size, check LLVM assumptions. llvm::TargetLibraryInfo needs to know the size of wchar_t to work on functions like `wcslen`. This p

r301218 - Pragma: Fix DebugOverflowStack() resulting in endless loop.

2017-04-24 Thread Matthias Braun via cfe-commits
Author: matze Date: Mon Apr 24 13:41:00 2017 New Revision: 301218 URL: http://llvm.org/viewvc/llvm-project?rev=301218&view=rev Log: Pragma: Fix DebugOverflowStack() resulting in endless loop. Drive-by fix (noticed while working on https://reviews.llvm.org/D32205): DebugOverflowStack() is supposed

r294065 - Driver: Do not warn about unused -pthread when linking on darwin

2017-02-03 Thread Matthias Braun via cfe-commits
Author: matze Date: Fri Feb 3 17:09:31 2017 New Revision: 294065 URL: http://llvm.org/viewvc/llvm-project?rev=294065&view=rev Log: Driver: Do not warn about unused -pthread when linking on darwin While there is nothing to do at link time to get pthreads support on darwin, specifying the argument

r293364 - Avoid calling dump() in normal code

2017-01-27 Thread Matthias Braun via cfe-commits
Author: matze Date: Fri Jan 27 20:36:00 2017 New Revision: 293364 URL: http://llvm.org/viewvc/llvm-project?rev=293364&view=rev Log: Avoid calling dump() in normal code dump() is only available in debug builds and meant for debugger usage, normal code should use something like print(errs()); Modi

  1   2   >