[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Amir Ayupov via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Amir Ayupov via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Amir Ayupov via llvm-branch-commits
@@ -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 __

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Amir Ayupov via llvm-branch-commits
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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Amir Ayupov via 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/

[llvm-branch-commits] [tsan] Replace ALIGNED with alignas (PR #98959)

2024-07-15 Thread Thurston Dang via llvm-branch-commits
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

[llvm-branch-commits] [tsan] Replace ALIGNED with alignas (PR #98959)

2024-07-15 Thread via 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/

[llvm-branch-commits] [tsan] Replace ALIGNED with alignas (PR #98959)

2024-07-15 Thread Fangrui Song via llvm-branch-commits
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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Shaw Young via 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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Shaw Young via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Shaw Young via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Davide Italiano via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Davide Italiano via 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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Davide Italiano via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Davide Italiano via llvm-branch-commits
@@ -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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Davide Italiano via llvm-branch-commits
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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Davide Italiano via 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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Davide Italiano via llvm-branch-commits
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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -953,6 +954,22 @@ bool ClauseProcessor::processMap( if (origSymbol && fir::isTypeWithDescriptor(origSymbol.getType())) symAddr = origSymbol; + if (object.sym()->owner().IsDerivedType()) { +omp::ObjectList objectList = gatherObjects

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
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

[llvm-branch-commits] [llvm] [BOLT] Match functions with call graph (PR #98125)

2024-07-15 Thread Shaw Young via 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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread Kareem Ergawy via llvm-branch-commits
@@ -51,21 +55,66 @@ class OMPMapInfoFinalizationPass : public fir::impl::OMPMapInfoFinalizationPassBase< OMPMapInfoFinalizationPass> { - void genDescriptorMemberMaps(mlir::omp::MapInfoOp op, - fir::FirOpBuilder &builder, -

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread Kareem Ergawy via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread Kareem Ergawy via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread Kareem Ergawy via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread Kareem Ergawy via llvm-branch-commits
@@ -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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread Kareem Ergawy via 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

[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

2024-07-15 Thread Kareem Ergawy via 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