https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124334
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124334
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124334
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124334
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124333
>From 0f1f43a5f19d4055c1896a70e050965b4d309790 Mon Sep 17 00:00:00 2001
From: wlei
Date: Wed, 12 Feb 2025 22:03:21 -0800
Subject: [PATCH] remove irrelevant code
Created using spr 1.3.6-beta.1
---
llvm/tools/
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124333
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124333
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/125649
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm created
https://github.com/llvm/llvm-project/pull/125649
Test Plan: llvm/test/CodeGen/X86/function-address-map-function-sections.ll
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124334
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124334
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/124334
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124333
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/124333
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/124333
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/wlei-llvm created
https://github.com/llvm/llvm-project/pull/124334
Test Plan: llvm/test/CodeGen/X86/function-address-map-function-sections.ll
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.
https://github.com/wlei-llvm created
https://github.com/llvm/llvm-project/pull/124333
Test Plan: llvm/test/tools/llvm-readobj/ELF/func-map.test
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
wlei-llvm wrote:
> > > > > > Ping @wlei-llvm
> > > > >
> > > > >
> > > > > Sorry for the delay. The new version addressed my last comment (with
> > > > > just minor nits). However, I didn't fully follow the new features
> > > > > related to `ProbeMatchSpecs` stuffs. Could you add more descrip
wlei-llvm wrote:
> > > > > > Ping @wlei-llvm
> > > > >
> > > > >
> > > > > Sorry for the delay. The new version addressed my last comment (with
> > > > > just minor nits). However, I didn't fully follow the new features
> > > > > related to `ProbeMatchSpecs` stuffs. Could you add more descrip
https://github.com/wlei-llvm approved this pull request.
Sorry for the delay, LGTM.
https://github.com/llvm/llvm-project/pull/112996
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
https://github.com/wlei-llvm approved this pull request.
LGTM, thanks for addressing the comments!
https://github.com/llvm/llvm-project/pull/99891
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
https://github.com/wlei-llvm approved this pull request.
LGTM, thanks for addressing the comments!
https://github.com/llvm/llvm-project/pull/99891
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
wlei-llvm wrote:
> > > > Ping @wlei-llvm
> > >
> > >
> > > Sorry for the delay. The new version addressed my last comment (with just
> > > minor nits). However, I didn't fully follow the new features related to
> > > `ProbeMatchSpecs` stuffs. Could you add more descriptions to the diff
> > >
wlei-llvm wrote:
> > > > Ping @wlei-llvm
> > >
> > >
> > > Sorry for the delay. The new version addressed my last comment (with just
> > > minor nits). However, I didn't fully follow the new features related to
> > > `ProbeMatchSpecs` stuffs. Could you add more descriptions to the diff
> > >
wlei-llvm wrote:
Hi, here is the reduced repro (not perfect, but was as far as I can get),
thanks!
```
namespace std
{
template
_Tp
__declval(long);
template
auto declval() noexcept -> decltype(__declval<_Tp>(0));
template
class __is_convertible_helper
{
template
@@ -447,12 +561,12 @@ createFlowFunction(const
BinaryFunction::BasicBlockOrderType &BlockOrder) {
/// of the basic blocks in the binary, the count is "matched" to the block.
/// Similarly, if both the source and the target of a count in the profile are
/// matched to a jump in
@@ -482,11 +596,68 @@ matchWeightsByHashes(BinaryContext &BC,
<< Twine::utohexstr(BB->getHash()) << "\n");
}
StaleMatcher Matcher;
+ // Collects function pseudo probes for use in the StaleMatcher.
+ if (opts::StaleMatchingWithPseudoProbes) {
+con
wlei-llvm wrote:
> > Ping @wlei-llvm
>
> Sorry for the delay. The new version addressed my last comment (with just
> minor nits). However, I didn't fully follow the new features related to
> `ProbeMatchSpecs` stuffs. Could you add more descriptions to the diff
> summary? Or if it’s not a lot
wlei-llvm wrote:
Hi @sdkrystian , FYI, we also hit an error/assertion that bisected to this
https://github.com/llvm/llvm-project/pull/114569
```
lvm-project/clang/lib/AST/ExprConstant.cpp:16601: bool
clang::Expr::EvaluateAsConstantExpr(EvalResult &, const ASTContext &,
ConstantExprKind) const
https://github.com/wlei-llvm closed
https://github.com/llvm/llvm-project/pull/114364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/114364
>From a7b444bd75d6f83ed0f5692783990a59f36e8459 Mon Sep 17 00:00:00 2001
From: wlei
Date: Thu, 31 Oct 2024 09:58:27 -0700
Subject: [PATCH 1/4] Reapply "[InstrPGO] Support cold function coverage
instrumentation
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/114364
>From a7b444bd75d6f83ed0f5692783990a59f36e8459 Mon Sep 17 00:00:00 2001
From: wlei
Date: Thu, 31 Oct 2024 09:58:27 -0700
Subject: [PATCH 1/4] Reapply "[InstrPGO] Support cold function coverage
instrumentation
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/114364
>From a7b444bd75d6f83ed0f5692783990a59f36e8459 Mon Sep 17 00:00:00 2001
From: wlei
Date: Thu, 31 Oct 2024 09:58:27 -0700
Subject: [PATCH 1/3] Reapply "[InstrPGO] Support cold function coverage
instrumentation
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/114364
>From a7b444bd75d6f83ed0f5692783990a59f36e8459 Mon Sep 17 00:00:00 2001
From: wlei
Date: Thu, 31 Oct 2024 09:58:27 -0700
Subject: [PATCH 1/3] Reapply "[InstrPGO] Support cold function coverage
instrumentation
@@ -1182,8 +1187,13 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
const bool IsCtxProfUse =
!UseCtxProfile.empty() && Phase == ThinOrFullLTOPhase::ThinLTOPreLink;
+ // Enable cold function coverage instrumentation if
+ // InstrumentColdF
https://github.com/wlei-llvm ready_for_review
https://github.com/llvm/llvm-project/pull/114364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm created
https://github.com/llvm/llvm-project/pull/114364
In https://github.com/llvm/llvm-project/pull/109837, it sets a global
variable(`PGOInstrumentColdFunctionOnly`) in PassBuilderPipelines.cpp which
introduced a data race detected by TSan. To fix this, I decoup
@@ -1182,8 +1187,13 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
const bool IsCtxProfUse =
!UseCtxProfile.empty() && Phase == ThinOrFullLTOPhase::ThinLTOPreLink;
+ // Enable cold function coverage instrumentation if
+ // InstrumentColdF
https://github.com/wlei-llvm closed
https://github.com/llvm/llvm-project/pull/114127
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/114127
>From 2c2ddcc9bda277c6da7b51147785c0f1e88b848d Mon Sep 17 00:00:00 2001
From: wlei
Date: Tue, 29 Oct 2024 13:28:33 -0700
Subject: [PATCH] specify clang --target to fix breakage on AIX
---
clang/test/CodeGen/
https://github.com/wlei-llvm created
https://github.com/llvm/llvm-project/pull/114127
`-fprofile-sample-use` is not supported on AIX, which caused a CI failure.
>From 2c2ddcc9bda277c6da7b51147785c0f1e88b848d Mon Sep 17 00:00:00 2001
From: wlei
Date: Tue, 29 Oct 2024 13:28:33 -0700
Subject: [PA
wlei-llvm wrote:
> Hi, this PR is causing a regression on the AIX bot here
> https://lab.llvm.org/buildbot/#/builders/64/builds/1321/steps/6/logs/FAIL__Clang__pgo-cold-function-coverage_c.
> Would you be able to take a look? I think it can be resolved by using
> clang_cc1 in the testcase of ma
@@ -628,9 +618,75 @@ void
YAMLProfileReader::InlineTreeNodeMapTy::matchInlineTrees(
}
}
}
-if (Cur && Decoder.getFuncDescForGUID(GUID)->FuncHash == Hash)
+// Don't match nodes if the profile is stale (mismatching binary FuncHash
+// and YAML Hash)
@@ -722,12 +722,28 @@ class BinaryContext {
/// Stats for stale profile matching:
/// the total number of basic blocks in the profile
uint32_t NumStaleBlocks{0};
-/// the number of matched basic blocks
-uint32_t NumMatchedBlocks{0};
+/// the number
wlei-llvm wrote:
> Ping @wlei-llvm
Sorry for the delay. The new version addressed my last comment (with just minor
nits). However, I didn't fully follow the new features related to
`ProbeMatchSpecs` stuffs. Could you add more descriptions to the diff summary?
Or if it’s not a lot of work, cou
https://github.com/wlei-llvm closed
https://github.com/llvm/llvm-project/pull/110330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm closed
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/8] [InstrPGO] Instrument sampling profile based cold
function
---
c
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/8] [InstrPGO] Instrument sampling profile based cold
function
---
c
https://github.com/wlei-llvm approved this pull request.
LGTM, thanks!
https://github.com/llvm/llvm-project/pull/101094
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/7] [InstrPGO] Instrument sampling profile based cold
function
---
c
@@ -649,6 +649,24 @@ static void addPGOAndCoverageFlags(const ToolChain &TC,
Compilation &C,
}
}
+ if (auto *ColdFuncCoverageArg = Args.getLastArg(
+ options::OPT_fprofile_generate_cold_function_coverage,
+ options::OPT_fprofile_generate_cold_function
@@ -319,6 +319,29 @@ static cl::opt PGOFunctionCriticalEdgeThreshold(
cl::desc("Do not instrument functions with the number of critical edges "
" greater than this threshold."));
+static cl::opt ColdFuncCoverageMaxEntryCount(
+"cold-function-coverage-max-e
@@ -1784,6 +1784,12 @@ defm debug_info_for_profiling :
BoolFOption<"debug-info-for-profiling",
PosFlag,
NegFlag>;
+def fprofile_generate_cold_function_coverage : Flag<["-"],
"fprofile-generate-cold-function-coverage">,
+Group, Visibility<[ClangOption, CLOption]>,
+
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/6] [InstrPGO] Instrument sampling profile based cold
function
---
c
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/5] [InstrPGO] Instrument sampling profile based cold
function
---
c
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/4] [InstrPGO] Instrument sampling profile based cold
function
---
c
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/3] [InstrPGO] Instrument sampling profile based cold
function
---
c
@@ -0,0 +1,24 @@
+; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage -S
| FileCheck --check-prefixes=COLD %s
+; RUN: opt < %s --passes=pgo-instr-gen -instrument-cold-function-coverage
-cold-function-coverage-max-entry-count=1 -S | FileCheck
--check-pr
@@ -1119,6 +1125,18 @@
PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// removed.
MPM.addPass(
PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */));
+
+if (InstrumentSampleColdFuncPath.getNumOccurrences() &&
+
@@ -1784,6 +1784,12 @@ defm debug_info_for_profiling :
BoolFOption<"debug-info-for-profiling",
PosFlag,
NegFlag>;
+def fprofile_generate_cold_function_coverage : Flag<["-"],
"fprofile-generate-cold-function-coverage">,
wlei-llvm wrote:
>Would -Wl,-lclang
@@ -1784,6 +1784,12 @@ defm debug_info_for_profiling :
BoolFOption<"debug-info-for-profiling",
PosFlag,
NegFlag>;
+def fprofile_generate_cold_function_coverage : Flag<["-"],
"fprofile-generate-cold-function-coverage">,
wlei-llvm wrote:
> I meant, why not
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/2] [InstrPGO] Instrument sampling profile based cold
function
---
c
wlei-llvm wrote:
Thanks for the context!
> Why not use the existing `-pgo-function-entry-coverage`
> (https://discourse.llvm.org/t/instrprofiling-lightweight-instrumentation/59113/14?u=ellishg)
> LLVM flag? It takes advantage of the `llvm.instrprof.cover` intrinsic which
> has less size and r
wlei-llvm wrote:
> For your use case, can you use
> [ProfileSymbolList](https://github.com/llvm/llvm-project/blob/32ffc9fdc2cd422c88c926b862adb3de726e3888/llvm/include/llvm/ProfileData/SampleProf.h#L1509-L1512)
> to identify very cold functions (executed but unsampled) or are you indeed
> look
@@ -1784,6 +1784,12 @@ defm debug_info_for_profiling :
BoolFOption<"debug-info-for-profiling",
PosFlag,
NegFlag>;
+def fprofile_generate_cold_function_coverage : Flag<["-"],
"fprofile-generate-cold-function-coverage">,
wlei-llvm wrote:
Sorry if my PR des
https://github.com/wlei-llvm ready_for_review
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH] [InstrPGO] Instrument sampling profile based cold function
---
clang/
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm created
https://github.com/llvm/llvm-project/pull/110330
None
>From d660d3b9a043a3530a735c1b95790116f6366062 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH 1/2] [InstrPGO] Instrument sampling profile based cold
function
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/110330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/110330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 436ab3bfb3d7f1978ba1598ec7d3ca006706cbd3 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH] [InstrPGO] Instrument sampling profile based cold function
---
clang/
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 36a747b5ef2123dd10909b91ad963e30af63b3b8 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH] [InstrPGO] Instrument sampling profile based cold function
---
clang/
https://github.com/wlei-llvm updated
https://github.com/llvm/llvm-project/pull/109837
>From 6a9b51130269975b5832a5439897dcb34b9dc942 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH] [InstrPGO] Instrument sampling profile based cold function
---
clang/
https://github.com/wlei-llvm edited
https://github.com/llvm/llvm-project/pull/109837
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/wlei-llvm created
https://github.com/llvm/llvm-project/pull/109837
None
>From b693ff3c33dcf21c1343d9d3432b1d7410a8b579 Mon Sep 17 00:00:00 2001
From: wlei
Date: Sun, 22 Sep 2024 20:23:20 -0700
Subject: [PATCH] [InstrPGO] Instrument sampling profile based cold function
---
@@ -587,6 +590,51 @@ size_t YAMLProfileReader::matchWithCallGraph(BinaryContext
&BC) {
return MatchedWithCallGraph;
}
+void YAMLProfileReader::InlineTreeNodeMapTy::matchInlineTrees(
+const MCPseudoProbeDecoder &Decoder,
+const yaml::bolt::PseudoProbeDesc &YamlPD,
+
@@ -587,6 +590,51 @@ size_t YAMLProfileReader::matchWithCallGraph(BinaryContext
&BC) {
return MatchedWithCallGraph;
}
+void YAMLProfileReader::InlineTreeNodeMapTy::matchInlineTrees(
+const MCPseudoProbeDecoder &Decoder,
+const yaml::bolt::PseudoProbeDesc &YamlPD,
+
@@ -96,6 +101,42 @@ class YAMLProfileReader : public ProfileReaderBase {
YamlBFAdjacencyMap;
};
+ // A class for matching inline tree nodes between profile and binary.
+ class InlineTreeNodeMapTy {
+DenseMap Map;
+
+void mapInlineTreeNode(uint32_t ProfileNo
@@ -587,6 +590,51 @@ size_t YAMLProfileReader::matchWithCallGraph(BinaryContext
&BC) {
return MatchedWithCallGraph;
}
+void YAMLProfileReader::InlineTreeNodeMapTy::matchInlineTrees(
+const MCPseudoProbeDecoder &Decoder,
+const yaml::bolt::PseudoProbeDesc &YamlPD,
+
@@ -96,6 +101,42 @@ class YAMLProfileReader : public ProfileReaderBase {
YamlBFAdjacencyMap;
};
+ // A class for matching inline tree nodes between profile and binary.
+ class InlineTreeNodeMapTy {
+DenseMap Map;
+
+void mapInlineTreeNode(uint32_t ProfileNo
@@ -96,6 +101,42 @@ class YAMLProfileReader : public ProfileReaderBase {
YamlBFAdjacencyMap;
};
+ // A class for matching inline tree nodes between profile and binary.
+ class InlineTreeNodeMapTy {
+DenseMap Map;
wlei-llvm wrote:
add comments
@@ -266,6 +305,69 @@ class StaleMatcher {
}
return BestBlock;
}
+
+ /// Matches a profile block with an binary block based on pseudo probes.
wlei-llvm wrote:
nit: `an` -> `a`
https://github.com/llvm/llvm-project/pull/99891
_
@@ -96,6 +101,42 @@ class YAMLProfileReader : public ProfileReaderBase {
YamlBFAdjacencyMap;
};
+ // A class for matching inline tree nodes between profile and binary.
+ class InlineTreeNodeMapTy {
+DenseMap Map;
+
+void mapInlineTreeNode(uint32_t ProfileNo
@@ -96,6 +101,42 @@ class YAMLProfileReader : public ProfileReaderBase {
YamlBFAdjacencyMap;
};
+ // A class for matching inline tree nodes between profile and binary.
+ class InlineTreeNodeMapTy {
+DenseMap Map;
+
+void mapInlineTreeNode(uint32_t ProfileNo
@@ -0,0 +1,62 @@
+## Tests stale block matching with pseudo probes.
+
+# REQUIRES: system-linux
+# RUN: split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/main.s -o %t.o
+# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q -nostdlib
+# RUN: llvm-bolt %t.exe -
@@ -722,12 +722,28 @@ class BinaryContext {
/// Stats for stale profile matching:
/// the total number of basic blocks in the profile
uint32_t NumStaleBlocks{0};
-/// the number of matched basic blocks
-uint32_t NumMatchedBlocks{0};
+/// the number
@@ -587,6 +590,51 @@ size_t YAMLProfileReader::matchWithCallGraph(BinaryContext
&BC) {
return MatchedWithCallGraph;
}
+void YAMLProfileReader::InlineTreeNodeMapTy::matchInlineTrees(
+const MCPseudoProbeDecoder &Decoder,
+const yaml::bolt::PseudoProbeDesc &YamlPD,
+
@@ -266,6 +305,69 @@ class StaleMatcher {
}
return BestBlock;
}
+
+ /// Matches a profile block with an binary block based on pseudo probes.
+ /// Returns the best matching block (or nullptr) and whether the match is
+ /// unambiguous.
+ std::pair matchWithPseudoP
@@ -722,6 +770,15 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
}
}
+ if (opts::StaleMatchingWithPseudoProbes) {
+const MCPseudoProbeDecoder *Decoder = BC.getPseudoProbeDecoder();
+assert(Decoder &&
+ "If pseudo probes are in use, pseudo
@@ -587,6 +590,51 @@ size_t YAMLProfileReader::matchWithCallGraph(BinaryContext
&BC) {
return MatchedWithCallGraph;
}
+void YAMLProfileReader::InlineTreeNodeMapTy::matchInlineTrees(
+const MCPseudoProbeDecoder &Decoder,
+const yaml::bolt::PseudoProbeDesc &YamlPD,
+
1 - 100 of 587 matches
Mail list logo