https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/20] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/20] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/20] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/19] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
@@ -374,15 +386,34 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
// the profile.
Function.setExecutionCount(BinaryFunction::COUNT_NO_PROFILE);
-// Recompute hash once per function.
-if (!opts::IgnoreHash)
- Function.computeHash(YamlBP.Header
@@ -0,0 +1,65 @@
+## Test YAMLProfileReader support for pass-through blocks in non-matching
edges:
+## match the profile edge A -> C to the CFG with blocks A -> B -> C.
aaupov wrote:
Please update the test description.
https://github.com/llvm/llvm-project/pull/
https://github.com/aaupov approved this pull request.
LG overall, with a couple of nits.
https://github.com/llvm/llvm-project/pull/95821
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
@@ -439,6 +482,11 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
BC.setNumUnusedProfiledObjects(NumUnused);
+ if (opts::Lite)
+for (BinaryFunction *BF : BC.getAllBinaryFunctions())
+ if (ProfiledFunctions.find(BF) == ProfiledFunctions.end())
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/95821
___
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/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/18] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/17] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/16] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/15] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung edited
https://github.com/llvm/llvm-project/pull/95821
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1161,4 +1165,4 @@
- `--print-options`
- Print non-default options after command line parsing
shawbyoung wrote:
Didn't touch this line - diff return nothing when applied to "added" and
"deleted" line - maybe it's some git corner case?
https://github.co
@@ -374,15 +393,34 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
// the profile.
Function.setExecutionCount(BinaryFunction::COUNT_NO_PROFILE);
-// Recompute hash once per function.
-if (!opts::IgnoreHash)
- Function.computeHash(YamlBP.Header
@@ -374,15 +393,34 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
// the profile.
Function.setExecutionCount(BinaryFunction::COUNT_NO_PROFILE);
-// Recompute hash once per function.
-if (!opts::IgnoreHash)
- Function.computeHash(YamlBP.Header
@@ -363,9 +364,27 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
return Profile.Hash == static_cast(BF.getHash());
};
- // We have to do 2 passes since LTO introduces an ambiguity in function
- // names. The first pass assigns profiles that match 100% by
@@ -2982,6 +2983,9 @@ void RewriteInstance::selectFunctionsToProcess() {
if (mustSkip(Function))
return false;
+if (opts::MatchingFunctionsWithHash)
+ return true;
aaupov wrote:
Since we're forcing the processing of all functions here to co
@@ -128,6 +128,11 @@ cl::opt
cl::desc("instrument code to generate accurate profile data"),
cl::cat(BoltOptCategory));
+cl::opt
+MatchingFunctionsWithHash("stale-matching-matching-functions-with-hash",
+ cl::desc("
@@ -1161,4 +1165,4 @@
- `--print-options`
- Print non-default options after command line parsing
aaupov wrote:
nit: please avoid unrelated changes
https://github.com/llvm/llvm-project/pull/95821
___
llvm-branch-c
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/14] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung edited
https://github.com/llvm/llvm-project/pull/95821
___
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/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/13] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/12] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/11] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 01/10] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YA
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/9] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
@@ -374,15 +377,33 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
// the profile.
Function.setExecutionCount(BinaryFunction::COUNT_NO_PROFILE);
-// Recompute hash once per function.
-if (!opts::IgnoreHash)
- Function.computeHash(YamlBP.Header
@@ -374,15 +377,33 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
// the profile.
Function.setExecutionCount(BinaryFunction::COUNT_NO_PROFILE);
-// Recompute hash once per function.
-if (!opts::IgnoreHash)
- Function.computeHash(YamlBP.Header
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/8] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/7] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/95821
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -383,6 +381,30 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
matchProfileToFunction(YamlBF, Function);
}
+ // Uses the strict hash of profiled and binary functions to match functions
+ // that are not matched by name or common name.
+ std::unordere
https://github.com/aaupov commented:
Looks very good, but please address some minor issues.
https://github.com/llvm/llvm-project/pull/95821
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
@@ -383,6 +381,30 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
matchProfileToFunction(YamlBF, Function);
}
+ // Uses the strict hash of profiled and binary functions to match functions
+ // that are not matched by name or common name.
+ std::unordere
@@ -383,6 +381,30 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
matchProfileToFunction(YamlBF, Function);
}
+ // Uses the strict hash of profiled and binary functions to match functions
aaupov wrote:
Let's put this under `if (!opts::Ig
@@ -420,6 +442,7 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
errs() << "BOLT-WARNING: profile ignored for function " << YamlBF.Name
<< '\n';
+
aaupov wrote:
nit: please drop
https://github.com/llvm/llvm-project/pull/95821
@@ -0,0 +1,67 @@
+## Test YAMLProfileReader support for pass-through blocks in non-matching
edges:
+## match the profile edge A -> C to the CFG with blocks A -> B -> C.
+
+# REQUIRES: system-linux
+# RUN: split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unkno
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/6] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/5] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/4] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/3] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH 1/2] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
https://github.com/shawbyoung updated
https://github.com/llvm/llvm-project/pull/95821
>From 92212c96ea169d26ac10bf8d750539bc5dd72c49 Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Mon, 17 Jun 2024 15:39:02 -0700
Subject: [PATCH] spr amend
Created using spr 1.3.4
---
bolt/lib/Profile/YAMLProf
45 matches
Mail list logo