[llvm-branch-commits] [BOLT][NFC] Unify Intra/InterIndex handling in writeBATYAML (PR #91278)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
aaupov wrote: Folded into https://github.com/llvm/llvm-project/pull/91289 https://github.com/llvm/llvm-project/pull/91278 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [BOLT][NFC] Unify Intra/InterIndex handling in writeBATYAML (PR #91278)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/91278 ___ 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] [BOLT] Use FuncBranchData Data in writeBATYAML (PR #91289)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/91289 ___ 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] Revert "[BOLT] Sort BranchData in DataAggregator" (PR #91289)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91289 ___ 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] Revert "[BOLT] Sort BranchData in DataAggregator" (PR #91289)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91289 ___ 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] Map branch source address to the containing basic block in BAT YAML (PR #91273)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
@@ -2378,21 +2378,24 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext , return CSI; }; + // Lookup containing basic block offset and index + auto getBlock = [](uint32_t Offset) { +auto BlockIt = BlockMap.upper_bound(Offset); +

[llvm-branch-commits] [BOLT] Set entry counts in BAT YAML profile (PR #91775)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91775 Align with DataReader::readProfile that sets entry block counts from FuncBranchData->EntryData. Test Plan: updated bolt-address-translation-yaml.test ___

[llvm-branch-commits] [BOLT] Use disambiguated local names in BAT YAML (PR #91773)

2024-05-10 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91773 Align BAT YAML to fdata profile. Test Plan: updated register-fragments-bolt-symbols.s ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org

[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/91666 ___ 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] Support POSSIBLE_PIC_FIXED_BRANCH (PR #91667)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91667 >From dd4d0de42048c063d5e5095a0c2594c7cc578df5 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 9 May 2024 19:35:26 -0700 Subject: [PATCH] Fix RISCVMCPlusBuilder Created using spr 1.3.4 ---

[llvm-branch-commits] [BOLT] Support POSSIBLE_PIC_FIXED_BRANCH (PR #91667)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91667 ___ 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] [BOLT] Support POSSIBLE_PIC_FIXED_BRANCH (PR #91667)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91667 ___ 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] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91666 >From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 9 May 2024 16:31:17 -0700 Subject: [PATCH] deregisterJumpTable Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91666 >From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 9 May 2024 16:31:17 -0700 Subject: [PATCH] deregisterJumpTable Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91666 >From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 9 May 2024 16:31:17 -0700 Subject: [PATCH] deregisterJumpTable Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91666 >From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 9 May 2024 16:31:17 -0700 Subject: [PATCH] deregisterJumpTable Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT][NFCI] Fix return type of BC::getSignedValueAtAddress (PR #91664)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91664 >From 8d97606325c0620edb2e7a169442e370a569be74 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 9 May 2024 16:35:22 -0700 Subject: [PATCH] clang-format Created using spr 1.3.4 ---

[llvm-branch-commits] [BOLT] Support POSSIBLE_PIC_FIXED_BRANCH (PR #91667)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91667 ___ 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] [BOLT] Support POSSIBLE_PIC_FIXED_BRANCH (PR #91667)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91667 ___ 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] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91666 >From 0166eb8ee85e2cdcb472502206ea4c13f49a6724 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Thu, 9 May 2024 16:31:17 -0700 Subject: [PATCH] deregisterJumpTable Created using spr 1.3.4 ---

[llvm-branch-commits] [BOLT][NFC] Define getExprValue helper (PR #91663)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/91663 ___ 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] [BOLT][NFC] Simplify analyzeIndirectBranch (PR #91662)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/91662 ___ 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] [BOLT] Support POSSIBLE_PIC_FIXED_BRANCH (PR #91667)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91667 Detect and support fixed PIC indirect jumps of the following form: ``` movslq En(%rip), %r1 leaq PIC_JUMP_TABLE(%rip), %r2 addq %r2, %r1 jmpq *%r1 ``` with PIC_JUMP_TABLE that looks like following: ``` JT:

[llvm-branch-commits] [BOLT] Eliminate dead jump tables (PR #91666)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91666 Dead jump tables such as those arising from FIXED_PIC_BRANCH optimization don't need to be updated or moved. Further, if any jump table entry points to a block removed by unreachable code elimination, we would be

[llvm-branch-commits] [BOLT][NFCI] Fix return type of BC::getSignedValueAtAddress (PR #91664)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91664 getSignedValueAtAddress calls DataExtractor::getSigned which naturally returns a signed value. Test Plan: NFCI ___ llvm-branch-commits mailing list

[llvm-branch-commits] [BOLT][NFC] Define getExprValue helper (PR #91663)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91663 Move out common code extracting the address of a MCExpr. To be reused in a follow-up diff. Test Plan: NFC ___ llvm-branch-commits mailing list

[llvm-branch-commits] [BOLT][NFC] Simplify analyzeIndirectBranch (PR #91662)

2024-05-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91662 Simplify mutually exclusive sanity checks in analyzeIndirectBranch, where an UNKNOWN IndirectBranchType is to be returned. Reduces confusion and code duplication when adding a new IndirectBranchType (to be added

[llvm-branch-commits] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-05-08 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90429 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-08 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][NFCI] Allow non-simple functions to be in disassembled state (PR #90806)

2024-05-08 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/90806 ___ 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] Ignore returns in DataAggregator (PR #90807)

2024-05-08 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90807 >From acf58ceb37d2aa917e8d84d243faadc58f5f3a7d Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 6 May 2024 13:35:04 -0700 Subject: [PATCH 1/3] Simplify IsReturn check Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-07 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90807 >From acf58ceb37d2aa917e8d84d243faadc58f5f3a7d Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 6 May 2024 13:35:04 -0700 Subject: [PATCH 1/2] Simplify IsReturn check Created using spr 1.3.4 ---

[llvm-branch-commits] Revert "[BOLT] Sort BranchData in DataAggregator" (PR #91289)

2024-05-06 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91289 This reverts commit 224e4cc516c747b4096fdbe4f2c8d46005eaaa65. Sorting invalidated data indices that are used to lookup frequency information for branch offsets or calls in NamesToBranches map. Test Plan: updated

[llvm-branch-commits] [BOLT][NFC] Unify Intra/InterIndex handling in writeBATYAML (PR #91278)

2024-05-06 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91278 ___ 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] [BOLT][NFC] Unify Intra/InterIndex handling in writeBATYAML (PR #91278)

2024-05-06 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91278 ___ 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] Map branch source address to the containing basic block in BAT YAML (PR #91273)

2024-05-06 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/91273 >From 2a848b1ac92203f7821d79ffe7cf0d04846542f3 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 6 May 2024 16:00:01 -0700 Subject: [PATCH] add blarge_new_bat_branchentry.preagg.txt Created using spr 1.3.4

[llvm-branch-commits] [BOLT][NFC] Unify Intra/InterIndex handling in writeBATYAML (PR #91278)

2024-05-06 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91278 Test Plan: NFC ___ 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] [BOLT] Map branch source address to the containing basic block in BAT YAML (PR #91273)

2024-05-06 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/91273 Fix an issue where the profile for all branches that have a BRANCHENTRY is dropped. If the branch has an entry in BAT, it will be translated to its input offset. We used to only permit the basic block offset as a

[llvm-branch-commits] [llvm] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-06 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90807 >From acf58ceb37d2aa917e8d84d243faadc58f5f3a7d Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 6 May 2024 13:35:04 -0700 Subject: [PATCH] Simplify IsReturn check Created using spr 1.3.4 ---

[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-04 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov converted_to_draft https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-03 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-03 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-03 Thread Amir Ayupov via llvm-branch-commits
@@ -478,18 +478,34 @@ uint64_t BoltAddressTranslation::translate(uint64_t FuncAddress, return Offset; const MapTy = Iter->second; + if (IsBranchSrc) { +// Try exact lookup first +auto KeyVal = Map.find(Offset); +if (KeyVal != Map.end() && KeyVal->second &

[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-03 Thread Amir Ayupov via llvm-branch-commits
@@ -478,18 +478,34 @@ uint64_t BoltAddressTranslation::translate(uint64_t FuncAddress, return Offset; const MapTy = Iter->second; + if (IsBranchSrc) { +// Try exact lookup first +auto KeyVal = Map.find(Offset); +if (KeyVal != Map.end() && KeyVal->second &

[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-03 Thread Amir Ayupov via llvm-branch-commits
@@ -24,6 +24,32 @@ READ-BAT-CHECK-NOT: BOLT-ERROR: unable to save profile in YAML format for input READ-BAT-CHECK: BOLT-INFO: Parsed 5 BAT entries READ-BAT-CHECK: PERF2BOLT: read 79 aggregated LBR entries +# Check handling of a branch not in BAT (added by BOLT) +RUN:

[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][NFCI] Allow non-simple functions to be in disassembled state (PR #90806)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov converted_to_draft https://github.com/llvm/llvm-project/pull/90806 ___ 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] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90807 ___ 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] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90807 ___ 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] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90807 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-02 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-01 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90811 ___ 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] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

2024-05-01 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/90811 Map branches that are not present in BAT to the containing basic block. The normal behavior is to map it to the preceding translation entry, which may or may not be a basic block, and this causes profile staleness

[llvm-branch-commits] [BOLT][NFCI] Allow non-simple functions to be in disassembled state (PR #90806)

2024-05-01 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90806 ___ 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] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-01 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90807 ___ 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] [BOLT] Ignore returns in DataAggregator (PR #90807)

2024-05-01 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/90807 Returns are ignored in perf/pre-aggregated/fdata profile reader (see DataReader::convertBranchData). They are also omitted in YAMLProfileWriter by virtue of not having the profile attached to them in the reader,

[llvm-branch-commits] [BOLT][NFCI] Allow non-simple functions to be in disassembled state (PR #90806)

2024-05-01 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/90806 BOLTed binaries have no relocations, thus all split functions are marked as non-simple (BinaryContext::registerFragment). In turn, this prevents them from being disassembled. Relax the restriction to allow

[llvm-branch-commits] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90429 ___ 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] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90429 ___ 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] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90429 ___ 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] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90429 ___ 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] Use heuristic for matching split local functions (PR #90424)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90424 >From b9a8ff53a491f126fb0dcf8cc371ed7a053e859b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 29 Apr 2024 12:48:24 -0700 Subject: [PATCH 1/4] Revert cdsplit-symbol-names.s ---

[llvm-branch-commits] [llvm] [BOLT] Use heuristic for matching split local functions (PR #90424)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90424 >From b9a8ff53a491f126fb0dcf8cc371ed7a053e859b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 29 Apr 2024 12:48:24 -0700 Subject: [PATCH 1/4] Revert cdsplit-symbol-names.s ---

[llvm-branch-commits] [llvm] [BOLT] Use heuristic for matching split local functions (PR #90424)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90424 ___ 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] Use heuristic for matching split local functions (PR #90424)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90424 >From b9a8ff53a491f126fb0dcf8cc371ed7a053e859b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 29 Apr 2024 12:48:24 -0700 Subject: [PATCH 1/4] Revert cdsplit-symbol-names.s ---

[llvm-branch-commits] [llvm] [BOLT] Use heuristic for matching split local functions (PR #90424)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90424 ___ 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] Use heuristic for matching split local functions (PR #90424)

2024-04-29 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90424 >From b9a8ff53a491f126fb0dcf8cc371ed7a053e859b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Mon, 29 Apr 2024 12:48:24 -0700 Subject: [PATCH 1/3] Revert cdsplit-symbol-names.s ---

[llvm-branch-commits] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-04-28 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90429 ___ 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] [BOLT][NFCI] Use heuristic for matching split global functions (PR #90429)

2024-04-28 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/90429 There should be no functional change, only faster fragment matching for large BOLTed binaries where all fragments of global parent functions are put under bolt-pseudo.o file symbol. Test Plan: NFC

[llvm-branch-commits] [BOLT] Use heuristic for matching split local functions (PR #90424)

2024-04-28 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90424 ___ 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] [BOLT] Use heuristic for matching split local functions (PR #90424)

2024-04-28 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/90424 ___ 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] [BOLT] Use heuristic for matching split local functions (PR #90424)

2024-04-28 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/90424 ___ 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] [BOLT] Use heuristic for matching BOLT split functions (PR #90424)

2024-04-28 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/90424 Use known order of BOLT split function symbols: fragment symbols immediately precede the parent fragment symbol. Depends On: https://github.com/llvm/llvm-project/pull/89648 Test Plan: updated

[llvm-branch-commits] [BOLT] Use BAT to register fragments (PR #87968)

2024-04-15 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/87968 ___ 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] [BOLT] Add local symbol hint to split fragment name (PR #88627)

2024-04-15 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/88627 ___ 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] [BOLT] Use offset deduplication for cold fragments (PR #87853)

2024-04-15 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87853 ___ 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] [BOLT] Use offset deduplication for cold fragments (PR #87853)

2024-04-15 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87853 ___ 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] [BOLT] Use offset deduplication for cold fragments (PR #87853)

2024-04-15 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/87853 ___ 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] [BOLT] Add local symbol hint to split fragment name (PR #88627)

2024-04-14 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/88627 ___ 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] [BOLT] Add local symbol hint to split fragment name (PR #88627)

2024-04-14 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/88627 ___ 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] [BOLT] Add local symbol hint to split fragment name (PR #88627)

2024-04-13 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov ready_for_review https://github.com/llvm/llvm-project/pull/88627 ___ 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] [BOLT] Add local symbol hint to split fragment name (PR #88627)

2024-04-13 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/88627 Use the hint to link a split fragment to a specific local parent function. Test Plan: Added split-local-hint.s ___ llvm-branch-commits mailing list

[llvm-branch-commits] [llvm] [BOLT] Cover all call sites in writeBATYAML (PR #87743)

2024-04-11 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87743 >From 251020f10d1e6a7a888164748f78acc6994e0ab3 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 5 Apr 2024 07:36:40 -0700 Subject: [PATCH] Remove stats logging Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Cover all call sites in writeBATYAML (PR #87743)

2024-04-11 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87743 >From 251020f10d1e6a7a888164748f78acc6994e0ab3 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 5 Apr 2024 07:36:40 -0700 Subject: [PATCH] Remove stats logging Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT][BAT] Fix handling of split functions (PR #87569)

2024-04-11 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87569 >From a3b0326428924a9565c673ffc6bc899ee788a19b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 5 Apr 2024 07:40:41 -0700 Subject: [PATCH] Move comment to NumColdSamples Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT][BAT] Fix handling of split functions (PR #87569)

2024-04-11 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87569 >From a3b0326428924a9565c673ffc6bc899ee788a19b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 5 Apr 2024 07:40:41 -0700 Subject: [PATCH] Move comment to NumColdSamples Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-11 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87967 >From c856716bbb987e09ee86b31287808736ef4f2f9b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Tue, 9 Apr 2024 04:52:43 -0700 Subject: [PATCH 1/3] Added test Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-11 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87967 >From c856716bbb987e09ee86b31287808736ef4f2f9b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Tue, 9 Apr 2024 04:52:43 -0700 Subject: [PATCH 1/3] Added test Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87967 >From c856716bbb987e09ee86b31287808736ef4f2f9b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Tue, 9 Apr 2024 04:52:43 -0700 Subject: [PATCH 1/3] Added test Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-09 Thread Amir Ayupov via llvm-branch-commits
aaupov wrote: > > > Creating a proper FDE entry is the right thing to do regardless of BAT. > > > How large is the regression? > > > > > > The largest I've seen is 34M->39M (HHVM instrumentation). > > Did you check if we patch every single function in he original `.text`? How > many

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/87967 >From c856716bbb987e09ee86b31287808736ef4f2f9b Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Tue, 9 Apr 2024 04:52:43 -0700 Subject: [PATCH 1/2] Added test Created using spr 1.3.4 ---

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-09 Thread Amir Ayupov via llvm-branch-commits
aaupov wrote: > > > Let's make `hasCFI()` return true for injected functions. > > > > > > Given that this change increases the size of eh_frame section, should we > > make it dependent on `enable-bat`, i.e. when we expect to feed the binary > > back to BOLT? > > Because otherwise this "fix"

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-09 Thread Amir Ayupov via llvm-branch-commits
aaupov wrote: > Let's make `hasCFI()` return true for injected functions. Given that this change increases the size of eh_frame section, should we make it dependent on `enable-bat`, i.e. when we expect to feed the binary back to BOLT? Because otherwise this "fix" is a pure size regression.

[llvm-branch-commits] [llvm] [BOLT] Emit empty FDE for injected functions (PR #87967)

2024-04-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov ready_for_review https://github.com/llvm/llvm-project/pull/87967 ___ 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] Emit empty FDE for injected functions (PR #87967)

2024-04-09 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/87967 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

<    1   2   3   4   5   6   >