[clang-tools-extra] [compiler-rt] [llvm] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-07 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,117 @@ +To update the inputs used below, run Inputs/update_vtable_value_prof_inputs.sh /path/to/updated/clang++ + +Show profile data from raw profiles. +RUN: llvm-profdata show --function=main --ic-targets --show-vtables %p/Inputs/vtable_prof.profraw | FileCheck %s --

[clang-tools-extra] [llvm] [compiler-rt] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-07 Thread Mingming Liu via cfe-commits
@@ -3045,10 +3071,10 @@ static int show_main(int argc, const char *argv[]) { if (ProfileKind == instr) return showInstrProfile( Filename, ShowCounts, TopNFunctions, ShowIndirectCallTargets, -ShowMemOPSizes, ShowDetailedSummary, DetailedSummaryCutoffs, -

[llvm] [clang] [clang-tools-extra] [nfc][llvm-profdata] Use cl::Subcommand to organize subcommand and options in llvm-profdata (PR #71328)

2023-11-13 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/71328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [nfc][llvm-profdata] Use cl::Subcommand to organize subcommand and options in llvm-profdata (PR #71328)

2023-11-13 Thread Mingming Liu via cfe-commits
@@ -47,6 +47,21 @@ using namespace llvm; +// https://llvm.org/docs/CommandGuide/llvm-profdata.html has documentations +// on each subcommand. +cl::SubCommand +ShowSubcommand("show", + "Takes a profile data file and displays the profiles"); +cl::SubComman

[clang] [clang-tools-extra] [llvm] [nfc][llvm-profdata] Use cl::Subcommand to organize subcommand and options in llvm-profdata (PR #71328)

2023-11-13 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 commented: thanks for the reviews! https://github.com/llvm/llvm-project/pull/71328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang] [nfc][llvm-profdata] Use cl::Subcommand to organize subcommand and options in llvm-profdata (PR #71328)

2023-11-13 Thread Mingming Liu via cfe-commits
@@ -435,13 +450,195 @@ static void writeInstrProfile(StringRef OutputFilename, } } -static void -mergeInstrProfile(const WeightedFileVector &Inputs, StringRef DebugInfoFilename, - SymbolRemapper *Remapper, StringRef OutputFilename, - Profil

[llvm] [clang] [clang-tools-extra] [nfc][llvm-profdata] Use cl::Subcommand to organize subcommand and options in llvm-profdata (PR #71328)

2023-11-13 Thread Mingming Liu via cfe-commits
@@ -1362,28 +1413,55 @@ static int merge_main(int argc, const char *argv[]) { exitWithError( "-supplement-instr-with-sample can only work with -instr. "); -supplementInstrProfile(WeightedInputs, SupplInstrWithSample, OutputFilename, -

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-04 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/74008 >From 4cb5b087485124a7f2375fdc018b42a0401e6409 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 30 Nov 2023 15:41:37 -0800 Subject: [PATCH 1/3] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier,

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-04 Thread Mingming Liu via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-04 Thread Mingming Liu via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Mingming Liu via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Mingming Liu via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Using the same added ICP test, profile matching on local-linkage `_ZL7callee0v` using `clang++ -v -fuse-ld=lld -O2 -fprofile-use=thinlto_icall_prom.profdata ` , as [this](https://gist.github.com/minglotus-6/11817ba645c6b12cd7116f41bfb1185e) pgo-instr-use output shows. How

[libc] [compiler-rt] [lldb] [llvm] [lld] [libcxx] [flang] [clang-tools-extra] [libunwind] [mlir] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table a

2023-12-05 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Three tests failed on the windows build-bot (https://buildkite.com/llvm-project/github-pull-requests/builds/20392#018c3c8d-d4fd-41f7-b456-b1a4ded6dc61). Two (Transforms/PGOProfile/vtable_profile.ll and tools/llvm-profdata/vtable-value-prof-basic.test) of these three passed i

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > Can you clarify what you are saying here - is it working or not working? It's working. The local-linkage `_ZL7callee0v` has function entry count annotated as `!prof`. David says the itanium remapper file was only used once during gcc to llvm transition, so not relevant he

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Just noticed there is a merge conflict. Will update my fork and merge. https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[llvm] [clang-tools-extra] [compiler-rt] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/74008 >From 4cb5b087485124a7f2375fdc018b42a0401e6409 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 30 Nov 2023 15:41:37 -0800 Subject: [PATCH 1/3] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier,

[clang-tools-extra] [clang] [compiler-rt] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-06 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > > > David says the itanium remapper file was only used once during gcc to > > > llvm transition, so not relevant here. > > > > > > I believe it was actually for the libstdc++ to libc++ transition (see > > https://reviews.llvm.org/D51247 and https://reviews.llvm.org/D51240

[compiler-rt] [clang] [llvm] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/74008 >From 4cb5b087485124a7f2375fdc018b42a0401e6409 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 30 Nov 2023 15:41:37 -0800 Subject: [PATCH 1/5] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier,

[clang] [llvm] [clang-tools-extra] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > > > > > David says the itanium remapper file was only used once during gcc to > > > > > llvm transition, so not relevant here. > > > > > > > > > > > > I believe it was actually for the libstdc++ to libc++ transition (see > > > > https://reviews.llvm.org/D51247 and https:/

[llvm] [clang] [compiler-rt] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: done. Sorry about leaving debugging-only stuff in a commit. https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [clang-tools-extra] [compiler-rt] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Mingming Liu via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[clang] [clang-tools-extra] [compiler-rt] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-07 Thread Mingming Liu via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[compiler-rt] [clang-tools-extra] [clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-08 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > . For IR PGO, there is basically no need to do so as the instrumentation and > profile-use should be in-sync. For front-end instrumentation, there seem to > be some use cases to use out of sync profile: https://reviews.llvm.org/D51240. Thanks for double checking. I noticed

[llvm] [compiler-rt] [clang-tools-extra] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-08 Thread Mingming Liu via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[clang] [compiler-rt] [clang-tools-extra] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-08 Thread Mingming Liu via cfe-commits
@@ -1,39 +1,45 @@ -; Do setup work for all below tests: generate bitcode and combined index -; RUN: opt -module-summary %s -o %t.bc -; RUN: opt -module-summary %p/Inputs/thinlto_indirect_call_promotion.ll -o %t2.bc +; The raw profiles and reduced IR inputs are generated from Inp

[clang-tools-extra] [llvm] [compiler-rt] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-08 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > > . For IR PGO, there is basically no need to do so as the instrumentation > > and profile-use should be in-sync. For front-end instrumentation, there > > seem to be some use cases to use out of sync profile: > > https://reviews.llvm.org/D51240. > > Thanks for double chec

[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > Mach-O (and 32-bit Windows) mangle global symbols with a leading `_`. It's very helpful to know the name differences exist on Mach-O/COFF to construct a test case for issue 74565. https://godbolt.org/z/686Y9vYod shows the name difference (cross comparing IR and machine as

[clang-tools-extra] [llvm] [clang] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Mingming Liu via cfe-commits
@@ -144,25 +145,27 @@ void GlobalObject::copyAttributesFrom(const GlobalObject *Src) { std::string GlobalValue::getGlobalIdentifier(StringRef Name, GlobalValue::LinkageTypes Linkage, Stri

[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-10 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,60 @@ +#!/bin/bash + +if [ $# -lt 1 ]; then + echo "Path to clang required!" + echo "Usage: update_thinlto_indirect_call_promotion_inputs.sh /path/to/updated/clang" + exit 1 +else + CLANG=$1 +fi + +# Allows the script to be invoked from other directories. +OUTDIR=$

[clang-tools-extra] [clang] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[clang-tools-extra] [clang] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -144,25 +145,27 @@ void GlobalObject::copyAttributesFrom(const GlobalObject *Src) { std::string GlobalValue::getGlobalIdentifier(StringRef Name, GlobalValue::LinkageTypes Linkage, Stri

[clang-tools-extra] [clang] [llvm] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[clang] [compiler-rt] [clang-tools-extra] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -41,6 +41,10 @@ namespace Intrinsic { typedef unsigned ID; } // end namespace Intrinsic +// Choose ';' as the delimiter. ':' was used once but it doesn't work well for +// Objective-C functions which commonly have :'s in their names minglotus-6 wrote: done

[compiler-rt] [llvm] [clang] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -147,6 +147,9 @@ def exclude_unsupported_files_for_aix(dirname): config.substitutions.append( ("%clang_pgouse=", build_invocation(clang_cflags) + " -fprofile-use=") ) +config.substitutions.append( +("%clangxx_pgouse=", build_invocation(clang_cxxflags) + " -fprofile-u

[llvm] [clang-tools-extra] [clang] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[clang] [compiler-rt] [clang-tools-extra] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -1,39 +0,0 @@ -; Do setup work for all below tests: generate bitcode and combined index minglotus-6 wrote: this is a valid point. Add the test back (in the new commit), use `rm -rf %t && split-file %s %t && cd %t` on IR and apply the `trap-on-exit` clean-up o

[compiler-rt] [clang-tools-extra] [llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[compiler-rt] [llvm] [clang] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -147,6 +147,9 @@ def exclude_unsupported_files_for_aix(dirname): config.substitutions.append( ("%clang_pgouse=", build_invocation(clang_cflags) + " -fprofile-use=") ) +config.substitutions.append( +("%clangxx_pgouse=", build_invocation(clang_cxxflags) + " -fprofile-u

[llvm] [clang] [clang-tools-extra] [compiler-rt] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,97 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect ca

[clang] [compiler-rt] [llvm] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-11 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,115 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect c

[llvm] [clang-tools-extra] [clang] [nfc][llvm-profdata] Use cl::Subcommand to organize subcommand and options in llvm-profdata (PR #71328)

2023-11-14 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/71328 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -12,27 +12,78 @@ #ifndef LLVM_ANALYSIS_INDIRECTCALLVISITOR_H #define LLVM_ANALYSIS_INDIRECTCALLVISITOR_H +#include "llvm/ADT/SetVector.h" #include "llvm/IR/InstVisitor.h" #include namespace llvm { -// Visitor class that finds all indirect call. +// Visitor class that

[clang-tools-extra] [clang] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -490,6 +591,23 @@ Error InstrProfSymtab::addFuncWithName(Function &F, StringRef PGOFuncName) { return Error::success(); } +uint64_t InstrProfSymtab::getVTableHashFromAddress(uint64_t Address) { + finalizeSymtab(); + auto It = lower_bound( + VTableAddrRangeToMD5Map

[llvm] [clang-tools-extra] [clang] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -1441,6 +1531,9 @@ void OverlapStats::dump(raw_fd_ostream &OS) const { case IPVK_MemOPSize: strncpy(ProfileKindName, "MemOP", 19); break; +case IPVK_VTableTarget: + strncpy(ProfileKindName, "VTable", 6); minglotus-6 wrote: thanks fo

[compiler-rt] [llvm] [clang] [clang-tools-extra] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [compiler-rt] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 commented: thanks for the reviews and discussions! This PR currently merged upstream main at a commit on Nov 9th. I started to have local changes after that, so refrained from another merge. Will do that separately. https://github.com/llvm/llvm-project/pull/6682

[compiler-rt] [clang-tools-extra] [clang] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -123,19 +137,29 @@ static int needsCounterPadding(void) { COMPILER_RT_VISIBILITY void __llvm_profile_get_padding_sizes_for_counters( uint64_t DataSize, uint64_t CountersSize, uint64_t NumBitmapBytes, -uint64_t NamesSize, uint64_t *PaddingBytesBeforeCounters, -uin

[compiler-rt] [llvm] [clang-tools-extra] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -275,18 +282,28 @@ lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, const uint64_t NumBitmapBytes = __llvm_profile_get_num_bitmap_bytes(BitmapBegin, BitmapEnd); const uint64_t NamesSize = __llvm_profile_get_name_size(NamesBegin, Na

[compiler-rt] [clang] [clang-tools-extra] [llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -489,30 +520,66 @@ class InstrProfSymtab { /// \p IterRange. This interface is used by IndexedProfReader. template Error create(const NameIterRange &IterRange); - /// Update the symtab by adding \p FuncName to the table. This interface - /// is used by the raw and t

[clang-tools-extra] [llvm] [compiler-rt] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -453,11 +471,94 @@ Error InstrProfSymtab::create(Module &M, bool InLTO) { if (Error E = addFuncWithName(F, getPGOFuncName(F, InLTO))) return E; } + + SmallVector Types; + for (GlobalVariable &G : M.globals()) { +if (!G.hasName()) + continue; +Types

[llvm] [clang] [clang-tools-extra] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -1070,8 +1084,138 @@ void InstrProfiling::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } -GlobalVariable *InstrProfiling::setupProfileSection(InstrProfInstBase *Inc, -

[llvm] [compiler-rt] [clang] [clang-tools-extra] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
@@ -1070,8 +1084,138 @@ void InstrProfiling::maybeSetComdat(GlobalVariable *GV, Function *Fn, GV->setLinkage(GlobalValue::InternalLinkage); } -GlobalVariable *InstrProfiling::setupProfileSection(InstrProfInstBase *Inc, -

[compiler-rt] [llvm] [clang-tools-extra] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #668

2023-11-15 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: One heads up, the latest 'git merge main' brings a failure in test https://github.com/llvm/llvm-project/blob/main/compiler-rt/test/fuzzer/gc-sections.test :( . `ninja check-all` on a clean main gives the same failure. Hopefully it would be fixed soon. https://github.com/llv

[lldb] [clang] [mlir] [compiler-rt] [libc] [flang] [libunwind] [llvm] [lld] [libcxx] [clang-tools-extra] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table a

2023-11-16 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > One heads up, the latest 'git merge main' brings a failure in test > https://github.com/llvm/llvm-project/blob/main/compiler-rt/test/fuzzer/gc-sections.test > :( . `ninja check-all` on a clean main gives the same failure. Hopefully it > would be fixed soon. This is fixed

[lld] [llvm] [lldb] [clang-tools-extra] [libcxx] [libunwind] [mlir] [libc] [clang] [compiler-rt] [flang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table a

2023-11-17 Thread Mingming Liu via cfe-commits
@@ -453,11 +471,94 @@ Error InstrProfSymtab::create(Module &M, bool InLTO) { if (Error E = addFuncWithName(F, getPGOFuncName(F, InLTO))) return E; } + + SmallVector Types; + for (GlobalVariable &G : M.globals()) { +if (!G.hasName()) + continue; +Types

[clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-10-30 Thread Mingming Liu via cfe-commits
@@ -18,11 +18,16 @@ * pointers to the live data in memory. This function is probably not what you * want. Use __llvm_profile_get_size_for_buffer instead. Use this function if * your program has a custom memory layout. + * NOTE: The change of function signature requires mo

[clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-10-30 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]Emit type metadata when -fprofile-generate is on (PR #70841)

2023-10-31 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 created https://github.com/llvm/llvm-project/pull/70841 None >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH] [Clang]Emit type metadata when -fprofile-generate is on

[clang] [Clang]Emit type metadata when -fprofile-generate is on (PR #70841)

2023-10-31 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]Emit type metadata when -fprofile-generate is on (PR #70841)

2023-10-31 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]Emit type metadata when IRPGO is used (PR #70841)

2023-10-31 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang]Emit type metadata when IRPGO is used (PR #70841)

2023-10-31 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/2] [Clang]Emit type metadata when -fprofile-generate is on -

[clang] [Clang] Emit type metadata on vtables when IRPGO option is on. (PR #70841)

2023-10-31 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO option is on. (PR #70841)

2023-10-31 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -43,7 +45,8 @@ int main(int argc, const char *argv[]) { uint64_t bufsize = __llvm_profile_get_size_for_buffer_internal( __llvm_profile_begin_data(), __llvm_profile_end_data(), __llvm_profile_begin_counters(), __llvm_profile_end_counters(), - __llvm_profile

[clang] [llvm] [compiler-rt] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -1,7 +1,7 @@ RUN: %clang_pgogen -O2 -fuse-ld=bfd -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn %S/../Inputs/instrprof-value-prof-real.c RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.warn 2>&1 |FileC

[compiler-rt] [llvm] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/3] [Clang]Emit type metadata when -fprofile-generate is on -

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 ready_for_review https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,145 @@ +// Test that type metadata are emitted with -fprofile-generate +// +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-unknown-linux -emit-llvm -S %s -o - | FileCheck %s --check-prefix=ITANIUM +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-pc

[llvm] [compiler-rt] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

2023-11-01 Thread Mingming Liu via cfe-commits
@@ -1,7 +1,7 @@ RUN: %clang_pgogen -O2 -fuse-ld=bfd -mllvm -disable-vp=false -mllvm -vp-static-alloc=true -DSTRESS=1 -o %t.ir.warn %S/../Inputs/instrprof-value-prof-real.c RUN: env LLVM_PROFILE_FILE=%t.ir.profraw LLVM_VP_MAX_NUM_VALS_PER_SITE=255 %run %t.ir.warn 2>&1 |FileC

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/4] [Clang]Emit type metadata when -fprofile-generate is on -

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/5] [Clang]Emit type metadata when -fprofile-generate is on -

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,145 @@ +// Test that type metadata are emitted with -fprofile-generate +// +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-unknown-linux -emit-llvm -S %s -o - | FileCheck %s --check-prefix=ITANIUM +// RUN: %clang -fprofile-generate -fno-lto -target x86_64-pc

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-02 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
@@ -1,98 +1,116 @@ + // Tests for the cfi-vcall feature: -// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
@@ -101,14 +119,16 @@ // ITANIUM-OPT-SAME: !type [[EF16:![0-9]+]] // ITANIUM-OPT: @llvm.compiler.used = appending global [1 x ptr] [ptr @_ZTVN5test31EE] -// MS: comdat($"??_7A@@6B@"), !type [[A8:![0-9]+]] -// MS: comdat($"??_7B@@6B0@@"), !type [[B8:![0-9]+]] -// MS: comdat($"

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
@@ -1312,7 +1312,7 @@ llvm::GlobalObject::VCallVisibility CodeGenModule::GetVCallVisibilityLevel( void CodeGenModule::EmitVTableTypeMetadata(const CXXRecordDecl *RD, llvm::GlobalVariable *VTable,

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
@@ -1,98 +1,116 @@ + // Tests for the cfi-vcall feature: -// RUN: %clang_cc1 -flto -flto-unit -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall -fsanitize-trap=cfi-vcall -emit-llvm -o - %s | FileCheck --check-prefix=CFI --check-prefix=CFI-NVT-NO-RV --check-

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/70841 >From 99abebc88c09346bd4a70bbf39df13b249116c09 Mon Sep 17 00:00:00 2001 From: Mingming Liu Date: Tue, 31 Oct 2023 01:17:03 -0700 Subject: [PATCH 1/6] [Clang]Emit type metadata when -fprofile-generate is on -

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > Somehow I missed those other uses of the ITANIUM prefix. Thanks for cleaning > it up though I think the new names are more descriptive. yep! I hope the new names helps more or less going forward. Thanks for the feedbacks! https://github.com/llvm/llvm-project/pull/70841 __

[clang] [Clang] Emit type metadata on vtables when IRPGO instrumentation option is on. (PR #70841)

2023-11-03 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/70841 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang-tools-extra] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-12 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 commented: Resolved comments except the pending discussion about whether to use `.proftext` or`.profraw`. Added `REQUIRES: zlib` for LLVM IR test since the profile reader should be built with zlib support. I'll probably spend sometime to get this test running o

[llvm] [compiler-rt] [clang] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-12 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang-tools-extra] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-12 Thread Mingming Liu via cfe-commits
@@ -352,6 +366,8 @@ std::string getIRPGOFuncName(const Function &F, bool InLTO) { return getIRPGOObjectName(F, InLTO, getPGOFuncNameMetadata(F)); } +// DEPRECATED. Use `getIRPGOFuncName`for new code. See that function for minglotus-6 wrote: done. https://

[llvm] [clang] [compiler-rt] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-12 Thread Mingming Liu via cfe-commits
@@ -0,0 +1,115 @@ +// This is a regression test for ThinLTO indirect-call-promotion when candidate +// callees need to be imported from another IR module. In the C++ test case, +// `main` calls `global_func` which is defined in another module. `global_func` +// has two indirect c

[clang-tools-extra] [compiler-rt] [clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-13 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: > Resolved comments except the pending discussion about whether to use > `.proftext` or`.profraw`. > > Added `REQUIRES: zlib` for LLVM IR test since the profile reader should be > built with zlib support. > > I'll probably spend sometime to get this test running on my lapto

[clang] [compiler-rt] [llvm] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-13 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [llvm] [clang-tools-extra] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-18 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 closed https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   >