[llvm-branch-commits] [llvm] [NFC][MemProf] Move Radix tree methods to their own header and cpp. (PR #140501)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: ### Merge activity * **May 19, 7:09 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/140501). https://github.com/llvm/llvm-project/pull/140501 __

[llvm-branch-commits] [llvm] [NFC][MemProf] Move IndexedMemProfData to its own header. (PR #140503)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: ### Merge activity * **May 19, 7:09 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/140503). https://github.com/llvm/llvm-project/pull/140503 __

[llvm-branch-commits] [llvm] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord (PR #140502)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: ### Merge activity * **May 19, 7:09 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/140502). https://github.com/llvm/llvm-project/pull/140502 __

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: ### Merge activity * **May 19, 7:09 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/140505). https://github.com/llvm/llvm-project/pull/140505 __

[llvm-branch-commits] [llvm] [NFC][MemProf] Add the LLVM license text and minor clean up. (PR #140504)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: ### Merge activity * **May 19, 7:09 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/140504). https://github.com/llvm/llvm-project/pull/140504 __

[llvm-branch-commits] [llvm] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord (PR #140502)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140502 >From 9028dc98ac740d72c9c6ad02e4503da5e9c02a13 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 20:20:00 -0700 Subject: [PATCH 1/2] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord

[llvm-branch-commits] [llvm] [NFC][MemProf] Move Radix tree methods to their own header and cpp. (PR #140501)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140501 >From 178cc0cac2258349b482f9315694f84e9d3581a5 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 18:54:05 -0700 Subject: [PATCH 1/2] [NFC][MemProf] Move Radix tree methods to their own hea

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140505 >From 305e2bdbab27828633afb3d1e2698002f7ccadda Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Mon, 19 May 2025 00:03:59 -0700 Subject: [PATCH] [NFC][MemProf] Move types shared between Analysis, ProfileD

[llvm-branch-commits] [llvm] [NFC][MemProf] Move IndexedMemProfData to its own header. (PR #140503)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140503 >From 1f2f80df22f154bc317ae9298cf20c9f91574f55 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 23:41:29 -0700 Subject: [PATCH 1/2] [NFC][MemProf] Move IndexedMemProfData to its own header

[llvm-branch-commits] [llvm] [NFC][MemProf] Move IndexedMemProfData to its own header. (PR #140503)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140503 >From 1f2f80df22f154bc317ae9298cf20c9f91574f55 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 23:41:29 -0700 Subject: [PATCH 1/2] [NFC][MemProf] Move IndexedMemProfData to its own header

[llvm-branch-commits] [llvm] [NFC][MemProf] Add the LLVM license text and minor clean up. (PR #140504)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140504 >From 36aeb3a179b64b9631af7849ed08d8cf7c7564e5 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 23:55:43 -0700 Subject: [PATCH] [NFC][MemProf] Add the LLVM license text and minor clean up.

[llvm-branch-commits] [llvm] [NFC][MemProf] Move Radix tree methods to their own header and cpp. (PR #140501)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140501 >From 178cc0cac2258349b482f9315694f84e9d3581a5 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 18:54:05 -0700 Subject: [PATCH 1/2] [NFC][MemProf] Move Radix tree methods to their own hea

[llvm-branch-commits] [llvm] [NFC][MemProf] Add the LLVM license text and minor clean up. (PR #140504)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140504 >From 36aeb3a179b64b9631af7849ed08d8cf7c7564e5 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 23:55:43 -0700 Subject: [PATCH] [NFC][MemProf] Add the LLVM license text and minor clean up.

[llvm-branch-commits] [llvm] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord (PR #140502)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140502 >From 9028dc98ac740d72c9c6ad02e4503da5e9c02a13 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 20:20:00 -0700 Subject: [PATCH 1/2] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140505 >From 305e2bdbab27828633afb3d1e2698002f7ccadda Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Mon, 19 May 2025 00:03:59 -0700 Subject: [PATCH] [NFC][MemProf] Move types shared between Analysis, ProfileD

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
@@ -46,6 +46,7 @@ #include "llvm/Transforms/Utils/ModuleUtils.h" #include #include +#include snehasish wrote: Yes, we need it for the `LocHashToCallSites` type but we were including it via ModuleSummaryIndex.h. https://github.com/llvm/llvm-project/pull/14

[llvm-branch-commits] [llvm] [NFC][MemProf] Move Radix tree methods to their own header and cpp. (PR #140501)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/140501?utm_source=stack-comment-downstack-mergeability-warning

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/140505 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord (PR #140502)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish created https://github.com/llvm/llvm-project/pull/140502 None >From 83ff2babe9dc5e71bc01eefb0aa78e6634d25351 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 20:20:00 -0700 Subject: [PATCH] [NFC][MemProf] Move getGUID out of IndexedMemProfRecor

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/140505 >From 8751ae1be821ebc4803bddd05ddb49a84c0b2773 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Mon, 19 May 2025 00:03:59 -0700 Subject: [PATCH] [NFC][MemProf] Move types shared between Analysis, ProfileD

[llvm-branch-commits] [llvm] [NFC][MemProf] Move Radix tree methods to their own header and cpp. (PR #140501)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish created https://github.com/llvm/llvm-project/pull/140501 None >From c8e520c48fe9e64f9e2ac389498d0e27797bf362 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 18:54:05 -0700 Subject: [PATCH] [NFC][MemProf] Move Radix tree methods to their own he

[llvm-branch-commits] [llvm] [NFC][MemProf] Move IndexedMemProfData to its own header. (PR #140503)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/140503 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [NFC][MemProf] Add the LLVM license text and minor clean up. (PR #140504)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/140504 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord (PR #140502)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/140502 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [NFC][MemProf] Move Radix tree methods to their own header and cpp. (PR #140501)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/140501 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [NFC][MemProf] Move getGUID out of IndexedMemProfRecord (PR #140502)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/140502?utm_source=stack-comment-downstack-mergeability-warning

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/140505?utm_source=stack-comment-downstack-mergeability-warning

[llvm-branch-commits] [llvm] [NFC][MemProf] Move IndexedMemProfData to its own header. (PR #140503)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/140503?utm_source=stack-comment-downstack-mergeability-warning

[llvm-branch-commits] [llvm] [NFC][MemProf] Add the LLVM license text and minor clean up. (PR #140504)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/140504?utm_source=stack-comment-downstack-mergeability-warning

[llvm-branch-commits] [llvm] [NFC][MemProf] Add the LLVM license text and minor clean up. (PR #140504)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish created https://github.com/llvm/llvm-project/pull/140504 None >From 532d85a11742e5a3994e5efce357f85c0c60a6c7 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 23:55:43 -0700 Subject: [PATCH] [NFC][MemProf] Add the LLVM license text and minor cle

[llvm-branch-commits] [llvm] [NFC][MemProf] Move IndexedMemProfData to its own header. (PR #140503)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish created https://github.com/llvm/llvm-project/pull/140503 None >From 61b636b6367ff9fe41eefce3430ee58551ffedf3 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 16 May 2025 23:41:29 -0700 Subject: [PATCH] [NFC][MemProf] Move IndexedMemProfData to its own head

[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

2025-05-19 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish created https://github.com/llvm/llvm-project/pull/140505 None >From d4413c619035039133f7d3509bbe6c94a1650adf Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Mon, 19 May 2025 00:03:59 -0700 Subject: [PATCH] [NFC][MemProf] Move types shared between Analysis, Pr

[llvm-branch-commits] [llvm] [ctxprof] Flatten indirect call info in pre-thinlink compilation (PR #134766)

2025-04-08 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/134766 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [ctxprof] Flatten indirect call info in pre-thinlink compilation (PR #134766)

2025-04-08 Thread Snehasish Kumar via llvm-branch-commits
@@ -414,6 +417,58 @@ void removeInstrumentation(Function &F) { I.eraseFromParent(); } +void annotateIndirectCall( +Module &M, CallBase &CB, +const DenseMap &FlatProf, +const InstrProfCallsite &Ins) { + auto Idx = Ins.getIndex()->getZExtValue(); + auto FIt

[llvm-branch-commits] [llvm] [ctxprof] Flatten indirect call info in pre-thinlink compilation (PR #134766)

2025-04-08 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/134766 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [ctxprof] Flatten indirect call info in pre-thinlink compilation (PR #134766)

2025-04-08 Thread Snehasish Kumar via llvm-branch-commits
@@ -414,6 +417,58 @@ void removeInstrumentation(Function &F) { I.eraseFromParent(); } +void annotateIndirectCall( +Module &M, CallBase &CB, +const DenseMap &FlatProf, +const InstrProfCallsite &Ins) { + auto Idx = Ins.getIndex()->getZExtValue(); + auto FIt

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-31 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/132433 >From 4680029efc3f4e350f7a07033088a9925b9300d7 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 21 Mar 2025 17:00:38 + Subject: [PATCH] Update tests, apply clang-tidy suggestions --- llvm/lib/Tr

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-31 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/132433 >From 4680029efc3f4e350f7a07033088a9925b9300d7 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 21 Mar 2025 17:00:38 + Subject: [PATCH] Update tests, apply clang-tidy suggestions --- llvm/lib/Tr

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-30 Thread Snehasish Kumar via llvm-branch-commits
@@ -0,0 +1,62 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals --version 2 +; RUN: opt < %s -passes='simplifycfg' -simplifycfg-require-and-preserve-domtree=1 -S | FileCheck %s --check-prefix=HOIST + +; Test case based on C+

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-30 Thread Snehasish Kumar via llvm-branch-commits
@@ -3436,6 +3433,16 @@ static void combineMetadata(Instruction *K, const Instruction *J, K->setMetadata(LLVMContext::MD_callsite, MDNode::getMergedCallsiteMetadata(KCallSite, JCallSite)); } + + // Merge prof metadata. + // Handle separately to suppor

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-30 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/132433 >From 42a9972571f8c8872e7d71def2236be400428606 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 21 Mar 2025 17:00:38 + Subject: [PATCH] Update tests, apply clang-tidy suggestions --- llvm/lib/Tr

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-30 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/132433 >From 42a9972571f8c8872e7d71def2236be400428606 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 21 Mar 2025 17:00:38 + Subject: [PATCH] Update tests, apply clang-tidy suggestions --- llvm/lib/Tr

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-27 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish approved this pull request. https://github.com/llvm/llvm-project/pull/129781 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-27 Thread Snehasish Kumar via llvm-branch-commits
@@ -0,0 +1,141 @@ +; RUN: llc -mtriple=aarch64 -enable-split-machine-functions \ snehasish wrote: Yeah, it makes sense to rely on a more precise profile due to the fine grained nature of this optimization. Refactoring out the requirement as a condition common t

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-25 Thread Snehasish Kumar via llvm-branch-commits
@@ -0,0 +1,131 @@ +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" +target triple = "x86_64-grtev4-linux-gnu" + +; Tests that constant pool hotness is aggregated across the module. The snehasish wrote: I thin

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-25 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/129781 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-25 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish approved this pull request. lgtm with some suggested changes to the tests. https://github.com/llvm/llvm-project/pull/129781 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-25 Thread Snehasish Kumar via llvm-branch-commits
@@ -0,0 +1,141 @@ +; RUN: llc -mtriple=aarch64 -enable-split-machine-functions \ +; RUN: -partition-static-data-sections=true -function-sections=true \ +; RUN: -unique-section-names=false \ +; RUN: %s -o - 2>&1 | FileCheck %s --dump-input=always + +; Repeat the RUN com

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-25 Thread Snehasish Kumar via llvm-branch-commits
@@ -0,0 +1,141 @@ +; RUN: llc -mtriple=aarch64 -enable-split-machine-functions \ +; RUN: -partition-static-data-sections=true -function-sections=true \ +; RUN: -unique-section-names=false \ +; RUN: %s -o - 2>&1 | FileCheck %s --dump-input=always + +; Repeat the RUN com

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-25 Thread Snehasish Kumar via llvm-branch-commits
@@ -0,0 +1,141 @@ +; RUN: llc -mtriple=aarch64 -enable-split-machine-functions \ +; RUN: -partition-static-data-sections=true -function-sections=true \ +; RUN: -unique-section-names=false \ +; RUN: %s -o - 2>&1 | FileCheck %s --dump-input=always + +; Repeat the RUN com

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-25 Thread Snehasish Kumar via llvm-branch-commits
@@ -0,0 +1,141 @@ +; RUN: llc -mtriple=aarch64 -enable-split-machine-functions \ snehasish wrote: Can we drop the `-enable-split-machine-functions` flag here and below? https://github.com/llvm/llvm-project/pull/129781

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-21 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish created https://github.com/llvm/llvm-project/pull/132433 Preserve branch weight metadata when merging instructions if one of the instructions is missing metadata. This is similar in behaviour to what we do today for other types of metadata such as mmra, memprof and c

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-21 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish updated https://github.com/llvm/llvm-project/pull/132433 >From 5b2f87db7ec72d12e4d8837203c3c7b953649907 Mon Sep 17 00:00:00 2001 From: Snehasish Kumar Date: Fri, 21 Mar 2025 17:00:38 + Subject: [PATCH] [Metadata] Preserve MD_prof when merging instructions when

[llvm-branch-commits] [llvm] [Metadata] Preserve MD_prof when merging instructions when one is missing. (PR #132433)

2025-03-21 Thread Snehasish Kumar via llvm-branch-commits
snehasish wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/132433?utm_source=stack-comment-downstack-mergeability-warning

[llvm-branch-commits] [compiler-rt] [llvm] [ctxprof] Track unhandled call targets (PR #131417)

2025-03-17 Thread Snehasish Kumar via llvm-branch-commits
@@ -265,7 +275,16 @@ Error llvm::createCtxProfFromYAML(StringRef Profile, raw_ostream &Out) { if (!TopList) return createStringError( "Unexpected error converting internal structure to ctx profile"); - Writer.writeContextual(*TopList, DC.TotalRoo

[llvm-branch-commits] [compiler-rt] [llvm] [ctxprof] Track unhandled call targets (PR #131417)

2025-03-17 Thread Snehasish Kumar via llvm-branch-commits
@@ -246,22 +246,37 @@ ContextNode *getFlatProfile(FunctionData &Data, GUID Guid, ContextNode *getUnhandledContext(FunctionData &Data, GUID Guid, uint32_t NumCounters) { - // 1) if we are under a root (regardless if this thread is collecting or

[llvm-branch-commits] [compiler-rt] [llvm] [ctxprof] Track unhandled call targets (PR #131417)

2025-03-17 Thread Snehasish Kumar via llvm-branch-commits
@@ -246,22 +246,37 @@ ContextNode *getFlatProfile(FunctionData &Data, GUID Guid, ContextNode *getUnhandledContext(FunctionData &Data, GUID Guid, uint32_t NumCounters) { - // 1) if we are under a root (regardless if this thread is collecting or

[llvm-branch-commits] [compiler-rt] [llvm] [ctxprof] Track unhandled call targets (PR #131417)

2025-03-17 Thread Snehasish Kumar via llvm-branch-commits
@@ -83,6 +84,20 @@ struct ContextRoot { // Count the number of entries - regardless if we could take the `Taken` mutex ::__sanitizer::atomic_uint64_t TotalEntries = {}; + // Profiles for functions we encounter when collecting a contexutal profile, + // that are not asso

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-11 Thread Snehasish Kumar via llvm-branch-commits
@@ -206,14 +234,10 @@ void StaticDataSplitter::annotateStaticDataWithoutProfiles( for (const auto &MBB : MF) { for (const MachineInstr &I : MBB) { for (const MachineOperand &Op : I.operands()) { -if (!Op.isGlobal()) - continue; -const Globa

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-10 Thread Snehasish Kumar via llvm-branch-commits
@@ -2769,6 +2769,23 @@ namespace { } // end anonymous namespace +StringRef AsmPrinter::getConstantSectionSuffix(const Constant *C) const { snehasish wrote: Consider refactoring a bit to reduce nesting -- ``` if(!TM.Options.EnableStaticDataPartitioning || C

[llvm-branch-commits] [llvm] [CodeGen][StaticDataSplitter]Support constant pool partitioning (PR #129781)

2025-03-10 Thread Snehasish Kumar via llvm-branch-commits
@@ -2769,6 +2769,23 @@ namespace { } // end anonymous namespace +StringRef AsmPrinter::getConstantSectionSuffix(const Constant *C) const { + SmallString<8> SectionNameSuffix; + if (TM.Options.EnableStaticDataPartitioning) { +if (C && SDPI && PSI) { + auto Count = S

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -456,3 +463,170 @@ declare void @_ZN5Base35func3Ev(ptr) // 1 call instruction from the entry block. EXPECT_EQ(F->front().size(), OrigEntryBBSize + 4); } + +using namespace llvm::ctx_profile; + +class ContextManager final { + std::vector> Nodes; + std::map Roots; + +pub

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish approved this pull request. lgtm, rest are minor nits. https://github.com/llvm/llvm-project/pull/105469 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -456,3 +463,170 @@ declare void @_ZN5Base35func3Ev(ptr) // 1 call instruction from the entry block. EXPECT_EQ(F->front().size(), OrigEntryBBSize + 4); } + +using namespace llvm::ctx_profile; + +class ContextManager final { + std::vector> Nodes; + std::map Roots; + +pub

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -456,3 +463,170 @@ declare void @_ZN5Base35func3Ev(ptr) // 1 call instruction from the entry block. EXPECT_EQ(F->front().size(), OrigEntryBBSize + 4); } + +using namespace llvm::ctx_profile; + +class ContextManager final { + std::vector> Nodes; + std::map Roots; + +pub

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
https://github.com/snehasish edited https://github.com/llvm/llvm-project/pull/105469 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -572,6 +575,89 @@ CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee, return promoteCall(NewInst, Callee); } +CallBase *llvm::promoteCallWithIfThenElse(CallBase &CB, Function &Callee, + PGOContextualProfile &

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -456,3 +463,170 @@ declare void @_ZN5Base35func3Ev(ptr) // 1 call instruction from the entry block. EXPECT_EQ(F->front().size(), OrigEntryBBSize + 4); } + +using namespace llvm::ctx_profile; + +class ContextManager final { + std::vector> Nodes; + std::map Roots; + +pub

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -572,6 +575,89 @@ CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee, return promoteCall(NewInst, Callee); } +CallBase *llvm::promoteCallWithIfThenElse(CallBase &CB, Function &Callee, + PGOContextualProfile &

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -572,6 +575,89 @@ CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee, return promoteCall(NewInst, Callee); } +CallBase *llvm::promoteCallWithIfThenElse(CallBase &CB, Function &Callee, + PGOContextualProfile &

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -572,6 +575,89 @@ CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee, return promoteCall(NewInst, Callee); } +CallBase *llvm::promoteCallWithIfThenElse(CallBase &CB, Function &Callee, + PGOContextualProfile &

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -300,6 +305,11 @@ Value *InstrProfCallsite::getCallee() const { return nullptr; } +void InstrProfCallsite::setCallee(Value *V) { snehasish wrote: nit: `Value* Callee` to match the decl. https://github.com/llvm/llvm-project/pull/105469 __

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -572,6 +575,89 @@ CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee, return promoteCall(NewInst, Callee); } +CallBase *llvm::promoteCallWithIfThenElse(CallBase &CB, Function &Callee, + PGOContextualProfile &

[llvm-branch-commits] [llvm] [ctx_prof] Add support for ICP (PR #105469)

2024-08-26 Thread Snehasish Kumar via llvm-branch-commits
@@ -572,6 +575,89 @@ CallBase &llvm::promoteCallWithIfThenElse(CallBase &CB, Function *Callee, return promoteCall(NewInst, Callee); } +CallBase *llvm::promoteCallWithIfThenElse(CallBase &CB, Function &Callee, + PGOContextualProfile &