@@ -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
@@ -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) + "
@@ -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
@@ -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
@@ -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
github-actions[bot] wrote:
:warning: Python code formatter, darker found issues in your code. :warning:
You can test this locally with the following command:
``bash
darker --check --diff -r
0e1a9e3084cd8dffa5d4f2cf6eabf9e7721e1cdd...3409af09aec7f81af7e6e976a774aa945aa7f6ee
@@ -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.
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
@@ -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
@@ -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
@@ -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
@@ -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
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
teresajohnson 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
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.
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
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
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -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,
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -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,
@@ -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,
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -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,
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject ,
GlobalValue::LinkageTypes Linkage,
StringRef FileName) {
SmallString<64> Name;
- if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-
@@ -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,
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/2] [PGO][GlobalValue][LTO]In
33 matches
Mail list logo