[clang] [lld] [llvm] Reapply "Deprecate the `-fbasic-block-sections=labels` option." (PR #110039)

2024-09-25 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee closed https://github.com/llvm/llvm-project/pull/110039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] Reapply "Deprecate the `-fbasic-block-sections=labels` option." (PR #110039)

2024-09-25 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee updated https://github.com/llvm/llvm-project/pull/110039 >From 52f633c5d3597c2ece53f821ee775aebce758efb Mon Sep 17 00:00:00 2001 From: Rahman Lavaee Date: Wed, 25 Sep 2024 20:12:07 + Subject: [PATCH 1/2] Reapply "Deprecate the `-fbasic-block-sections=labels` opti

[clang] [llvm] Reapply "Deprecate the `-fbasic-block-sections=labels` option." (PR #110039)

2024-09-25 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/110039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reapply "Deprecate the `-fbasic-block-sections=labels` option." (PR #110039)

2024-09-25 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee created https://github.com/llvm/llvm-project/pull/110039 This reverts commit 639a0afa9955a8613902e46e168767bc05c46cdd with a minor fix in lld/ELF/LTO.cpp which sets Options.BBAddrMap when `--lto-basic-block-sections=labels` is passed. >From 52f633c5d3597c2ece53f821e

[clang] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-25 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee closed https://github.com/llvm/llvm-project/pull/107494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-25 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: > > Just chiming in that I happened to spot the pre-merge check failure looks > > possibly related. > > @jh7370 It's weird I can't reproduce this on my machine. Fixed. It was an assertion failure. https://github.com/llvm/llvm-project/pull/107494

[clang] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-25 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee updated https://github.com/llvm/llvm-project/pull/107494 >From 5cc499a7abfeb464ebffba6a04017ec1e5304839 Mon Sep 17 00:00:00 2001 From: Rahman Lavaee Date: Thu, 5 Sep 2024 19:14:11 + Subject: [PATCH 1/2] Deprecate the `-fbasic-block-sections=labels` option. This f

[clang] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-20 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: > Just chiming in that I happened to spot the pre-merge check failure looks > possibly related. @jh7370 It's weird I can't reproduce this on my machine. https://github.com/llvm/llvm-project/pull/107494 ___ cfe-commits mailing list cfe-

[clang] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-20 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee updated https://github.com/llvm/llvm-project/pull/107494 >From 57989794675a67b955aaf0e06fb4dbdc3ad48c9b Mon Sep 17 00:00:00 2001 From: Rahman Lavaee Date: Thu, 5 Sep 2024 19:14:11 + Subject: [PATCH] Deprecate the `-fbasic-block-sections=labels` option. This featu

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-06 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee updated https://github.com/llvm/llvm-project/pull/107494 >From 1e4f893052f763908897aa9236bc0400bb03823b Mon Sep 17 00:00:00 2001 From: Rahman Lavaee Date: Thu, 5 Sep 2024 19:14:11 + Subject: [PATCH] Deprecate the `-fbasic-block-sections=labels` option. This featu

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-06 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee updated https://github.com/llvm/llvm-project/pull/107494 >From dd73efa8e99982c1ab015156c32bdc71f679361c Mon Sep 17 00:00:00 2001 From: Rahman Lavaee Date: Thu, 5 Sep 2024 19:14:11 + Subject: [PATCH] Deprecate the `-fbasic-block-sections=labels` option. This featu

[clang] [lld] [llvm] Deprecate the `-fbasic-block-sections=labels` option. (PR #107494)

2024-09-05 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee created https://github.com/llvm/llvm-project/pull/107494 This feature is supported via the newer option `-fbasic-block-address-map`. Using the old option still works by delegating to the newer option, while a warning is printed to show deprecation. >From 716f5da93a2

[clang] Propeller config for clang (PR #91002)

2024-05-03 Thread Rahman Lavaee via cfe-commits
@@ -928,6 +928,186 @@ if (CLANG_BOLT AND NOT LLVM_BUILD_INSTRUMENTED) ) endif() +if (CLANG_PROPELLER_INSTRUMENT AND NOT LLVM_BUILD_INSTRUMENTED) + set(CLANG_PATH ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) + set(CLANGXX_PATH ${CLANG_PATH}++) + set(PROPELLER_ARTIFACTS_DIR ${CMAKE

[lld] [llvm] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee closed https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [lld] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: Thank everyone for reviewing. I will probably merge this today. I want to save myself and others the trouble of merge conflicts over 38 files. https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@list

[lld] [llvm] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: > Just nits/minor questions from me, code otherwise LGTM. > > Sorry for the delay in review. I didn't realize you explicitly wanted me to > review portions of the code. Thank you for reviewing. The change in llvm-objdump happened after your PR handling PGOAnalysis. So I wanted

[clang] [lld] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
@@ -73,68 +83,89 @@ FileHeader: Sections: - Name:.text.foo Type:SHT_PROGBITS -Address: [[FOO_ADDR]] +Address: 0x4000 Flags: [SHF_ALLOC, SHF_EXECINSTR] -Content: '503b050520907d02ebf5c3' +Content: '503b050530907d08ebf50f8dee1fc3'

[clang] [lld] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
@@ -172,6 +172,105 @@ class OtoolOptTable : public CommonOptTable { "Mach-O object file displaying tool") {} }; +struct BBAddrMapLabel { + std::string BlockLabel; + std::string PGOAnalysis; +}; + +// This class represents the BBAddrMap and PGOMap assoc

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
@@ -858,62 +899,64 @@ struct BBAddrMap { bool hasIndirectBranch() const { return MD.HasIndirectBranch; } }; - BBAddrMap(uint64_t Addr, std::vector BBEntries) - : Addr(Addr), BBEntries(std::move(BBEntries)) {} + // Struct representing the BBAddrMap information for

[llvm] [lld] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-02-01 Thread Rahman Lavaee via cfe-commits
@@ -858,62 +899,64 @@ struct BBAddrMap { bool hasIndirectBranch() const { return MD.HasIndirectBranch; } }; - BBAddrMap(uint64_t Addr, std::vector BBEntries) - : Addr(Addr), BBEntries(std::move(BBEntries)) {} + // Struct representing the BBAddrMap information for

[clang] [llvm] [lld] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-25 Thread Rahman Lavaee via cfe-commits
@@ -858,62 +899,64 @@ struct BBAddrMap { bool hasIndirectBranch() const { return MD.HasIndirectBranch; } }; - BBAddrMap(uint64_t Addr, std::vector BBEntries) - : Addr(Addr), BBEntries(std::move(BBEntries)) {} + // Struct representing the BBAddrMap information for

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-25 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: @tmsri I appreciate if you could please review the codegen and options part. https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-25 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: @boomanaiden154 I appreciate if you could PTAL at llvm-objdump changes. https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-19 Thread Rahman Lavaee via cfe-commits
@@ -1401,17 +1406,48 @@ void AsmPrinter::emitBBAddrMapSection(const MachineFunction &MF) { uint8_t BBAddrMapVersion = OutStreamer->getContext().getBBAddrMapVersion(); OutStreamer->emitInt8(BBAddrMapVersion); OutStreamer->AddComment("feature"); - auto FeaturesBits = stat

[clang] [llvm] [lld] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee ready_for_review https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [llvm] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [llvm] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used together by decoupling the handling of the two features. (PR #74128)

2024-01-04 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee edited https://github.com/llvm/llvm-project/pull/74128 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [lld] [Propeller] Add new flag option '-basic-block-sections=listwithlabels=' to support to use Propeller iteratively. (PR #76497)

2024-01-02 Thread Rahman Lavaee via cfe-commits
rlavaee wrote: Thanks for looking into this. I didn't know you're still looking into this. I have a complete PR (including changes to llvm-objdump, llvm-readobj, etc.) ready here : https://github.com/rlavaee/llvm-project/tree/bb-addr-map https://github.com/llvm/llvm-project/pull/76497 ___

[lld] [llvm] [clang] [SHT_LLVM_BB_ADDR_MAP] Allow basic-block-sections and labels be used … (PR #74128)

2023-12-01 Thread Rahman Lavaee via cfe-commits
https://github.com/rlavaee created https://github.com/llvm/llvm-project/pull/74128 …together by decoupling the handling of the two features. Today `-split-machine-functions` (MFS) and `-fbasic-block-sections={all,list}` cannot be combined with `-basic-block-sections=labels` (the labels option

[clang] 7841e21 - Let -basic-block-sections=labels emit basicblock metadata in a new .bb_addr_map section, instead of emitting special unary-encoded symbols.

2020-09-14 Thread Rahman Lavaee via cfe-commits
Author: Rahman Lavaee Date: 2020-09-14T10:16:44-07:00 New Revision: 7841e21c98495ba5e33e0d2507d985bd5b938445 URL: https://github.com/llvm/llvm-project/commit/7841e21c98495ba5e33e0d2507d985bd5b938445 DIFF: https://github.com/llvm/llvm-project/commit/7841e21c98495ba5e33e0d2507d985bd5b938445.diff