@@ -446,6 +503,56 @@ size_t YAMLProfileReader::matchWithLTOCommonName() {
return MatchedWithLTOCommonName;
}
+size_t YAMLProfileReader::matchWithCallGraph(BinaryContext &BC) {
+ if (!opts::MatchWithCallGraph)
+return 0;
+
+ size_t MatchedWithCallGraph = 0;
+ CGMatcher
@@ -568,12 +675,30 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
}
YamlProfileToFunction.resize(YamlBP.Functions.size() + 1);
- // Computes hash for binary functions.
+ // Map profiled function ids to names.
+ for (yaml::bolt::BinaryFunctionProfile &YamlB
@@ -16,6 +16,37 @@
namespace llvm {
namespace bolt {
+/// A class for matching binary functions in functions in the YAML profile.
+struct CallGraphMatcher {
aaupov wrote:
Let's make it a proper class
https://github.com/llvm/llvm-project/pull/98125
__
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/98125
___
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/aaupov commented:
Thank you for working on this! It looks very good overall, left a couple of
comments inline. Please run this new matching on a large binary to answer
questions about runtime and matching quality in ambiguous cases.
https://github.com/llvm/llvm-project/pull/
https://github.com/thurstond approved this pull request.
https://github.com/llvm/llvm-project/pull/98959
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
llvmbot wrote:
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Fangrui Song (MaskRay)
Changes
Similar to #98958.
---
Full diff: https://github.com/llvm/llvm-project/pull/98959.diff
9 Files Affected:
- (modified) compiler-rt/lib/tsan/rtl/tsan_defs.h (+1-1)
- (modified) compiler-rt/
https://github.com/MaskRay created
https://github.com/llvm/llvm-project/pull/98959
Similar to #98958.
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -50,6 +54,59 @@ llvm::cl::opt ProfileUseDFS("profile-use-dfs",
namespace llvm {
namespace bolt {
+void CallGraphMatcher::addBFCGEdges(BinaryContext &BC,
+yaml::bolt::BinaryProfile &YamlBP,
+BinaryFuncti
@@ -446,6 +503,56 @@ size_t YAMLProfileReader::matchWithLTOCommonName() {
return MatchedWithLTOCommonName;
}
+size_t YAMLProfileReader::matchWithCallGraph(BinaryContext &BC) {
+ if (!opts::MatchWithCallGraph)
+return 0;
+
+ size_t MatchedWithCallGraph = 0;
+ CGMatcher
@@ -446,6 +503,56 @@ size_t YAMLProfileReader::matchWithLTOCommonName() {
return MatchedWithLTOCommonName;
}
+size_t YAMLProfileReader::matchWithCallGraph(BinaryContext &BC) {
+ if (!opts::MatchWithCallGraph)
+return 0;
+
+ size_t MatchedWithCallGraph = 0;
+ CGMatcher
@@ -446,6 +503,56 @@ size_t YAMLProfileReader::matchWithLTOCommonName() {
return MatchedWithLTOCommonName;
}
+size_t YAMLProfileReader::matchWithCallGraph(BinaryContext &BC) {
+ if (!opts::MatchWithCallGraph)
+return 0;
+
+ size_t MatchedWithCallGraph = 0;
+ CGMatcher
@@ -50,6 +54,59 @@ llvm::cl::opt ProfileUseDFS("profile-use-dfs",
namespace llvm {
namespace bolt {
+void CallGraphMatcher::addBFCGEdges(BinaryContext &BC,
+yaml::bolt::BinaryProfile &YamlBP,
+BinaryFuncti
@@ -568,12 +675,30 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
}
YamlProfileToFunction.resize(YamlBP.Functions.size() + 1);
- // Computes hash for binary functions.
+ // Map profiled function ids to names.
+ for (yaml::bolt::BinaryFunctionProfile &YamlB
@@ -446,6 +503,56 @@ size_t YAMLProfileReader::matchWithLTOCommonName() {
return MatchedWithLTOCommonName;
}
+size_t YAMLProfileReader::matchWithCallGraph(BinaryContext &BC) {
+ if (!opts::MatchWithCallGraph)
+return 0;
+
+ size_t MatchedWithCallGraph = 0;
+ CGMatcher
https://github.com/dcci edited https://github.com/llvm/llvm-project/pull/98125
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -16,6 +16,37 @@
namespace llvm {
namespace bolt {
+/// A class for matching binary functions in functions in the YAML profile.
dcci wrote:
I think it would be useful to add a general description of the algorithm, in
particular if you have a reference to t
https://github.com/dcci commented:
This is heading in the right direction.
https://github.com/llvm/llvm-project/pull/98125
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bran
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -953,6 +954,22 @@ bool ClauseProcessor::processMap(
if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType()))
symAddr = origSymbol;
+ if (object.sym()->owner().IsDerivedType()) {
+omp::ObjectList objectList = gatherObjects
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
https://github.com/agozillon commented:
Tried to reply to some of your initial comments and questions @ergawy !
Hopefully helpful :-) and no question is a newbie question, they're all very
appreciated as it makes me re-question myself which helps spot things I
overlooked!
I'll update the PR a
https://github.com/agozillon edited
https://github.com/llvm/llvm-project/pull/96266
___
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/98125
>From cf32a43e7c2b04079c6123fe13df4fb7226d771f Mon Sep 17 00:00:00 2001
From: shawbyoung
Date: Tue, 9 Jul 2024 10:04:25 -0700
Subject: [PATCH 01/11] Comments
Created using spr 1.3.4
---
bolt/lib/Profile/YAML
@@ -52,12 +52,22 @@ using DeclareTargetCapturePair =
struct OmpMapMemberIndicesData {
// The indices representing the component members placement in its derived
// type parents hierarchy.
- llvm::SmallVector memberPlacementIndices;
+ llvm::SmallVector> memberPlacementIndi
@@ -671,4 +672,51 @@ static inline bool isEqual(const Fortran::lower::SomeExpr
*x,
}
} // end namespace Fortran::lower
+// OpenMP utility functions used in locations outside of the
+// OpenMP lowering.
+namespace Fortran::lower::omp {
+
+[[maybe_unused]] static void fillMembe
@@ -30,17 +30,17 @@ subroutine mapType_array
!$omp end target
end subroutine mapType_array
-!CHECK: @.offload_sizes{{.*}} = private unnamed_addr constant [3 x i64] [i64
0, i64 24, i64 4]
-!CHECK: @.offload_maptypes{{.*}} = private unnamed_addr constant [3 x i64]
[i64 32, i
@@ -671,4 +672,51 @@ static inline bool isEqual(const Fortran::lower::SomeExpr
*x,
}
} // end namespace Fortran::lower
+// OpenMP utility functions used in locations outside of the
+// OpenMP lowering.
+namespace Fortran::lower::omp {
+
+[[maybe_unused]] static void fillMembe
@@ -51,21 +55,66 @@ class OMPMapInfoFinalizationPass
: public fir::impl::OMPMapInfoFinalizationPassBase<
OMPMapInfoFinalizationPass> {
- void genDescriptorMemberMaps(mlir::omp::MapInfoOp op,
- fir::FirOpBuilder &builder,
-
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
@@ -141,6 +143,110 @@ createMapInfoOp(fir::FirOpBuilder &builder,
mlir::Location loc,
return op;
}
+omp::ObjectList gatherObjects(omp::Object obj,
+ semantics::SemanticsContext &semaCtx) {
+ omp::ObjectList objList;
+ std::optional baseObj = g
https://github.com/ergawy edited https://github.com/llvm/llvm-project/pull/96266
___
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/ergawy edited https://github.com/llvm/llvm-project/pull/96266
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
37 matches
Mail list logo