@@ -215,13 +215,49 @@ class FunctionImporter {
SmallVector getSourceModules() const;
std::optional
-getImportType(const FunctionsToImportTy &GUIDToImportType,
- GlobalValue::GUID GUID) const;
+getImportType(StringRef FromModule, GlobalValue::GU
https://github.com/minglotus-6 closed
https://github.com/llvm/llvm-project/pull/69141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
minglotus-6 wrote:
Close this stale patch and won't merge conflicts in this one.
Working on https://github.com/llvm/llvm-project/pull/81442 now.
https://github.com/llvm/llvm-project/pull/69141
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
@@ -1425,16 +1430,27 @@ MDNode *getPGOFuncNameMetadata(const Function &F) {
return F.getMetadata(getPGOFuncNameMetadataName());
}
-void createPGOFuncNameMetadata(Function &F, StringRef PGOFuncName) {
- // Only for internal linkage functions.
- if (PGOFuncName == F.getName(
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
@@ -322,14 +796,133 @@ bool
IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) {
if (!NumCandidates ||
(PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount)))
continue;
+
auto PromotionCandidates = getPromotionCandidatesForCallSite
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
@@ -140,14 +348,56 @@ class IndirectCallPromoter {
// indirect callee with functions. Returns true if there are IR
// transformations and false otherwise.
bool tryToPromoteWithFuncCmp(
- CallBase &CB, const std::vector &Candidates,
- uint64_t TotalCount, ArrayRe
@@ -322,14 +796,133 @@ bool
IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) {
if (!NumCandidates ||
(PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount)))
continue;
+
auto PromotionCandidates = getPromotionCandidatesForCallSite
@@ -277,35 +626,160 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB,
Function *DirectCallee,
// Promote indirect-call to conditional direct-call for one callsite.
bool IndirectCallPromoter::tryToPromoteWithFuncCmp(
-CallBase &CB, const std::vector &Candidates,
-
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
@@ -1425,16 +1430,27 @@ MDNode *getPGOFuncNameMetadata(const Function &F) {
return F.getMetadata(getPGOFuncNameMetadataName());
}
-void createPGOFuncNameMetadata(Function &F, StringRef PGOFuncName) {
- // Only for internal linkage functions.
- if (PGOFuncName == F.getName(
@@ -103,27 +112,226 @@ static cl::opt
ICPDUMPAFTER("icp-dumpafter", cl::init(false), cl::Hidden,
cl::desc("Dump IR after transformation happens"));
+// Indirect call promotion pass will fall back to function-based comparison if
+// vtable-count / function-
@@ -322,14 +796,133 @@ bool
IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) {
if (!NumCandidates ||
(PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount)))
continue;
+
auto PromotionCandidates = getPromotionCandidatesForCallSite
@@ -322,14 +796,133 @@ bool
IndirectCallPromoter::processFunction(ProfileSummaryInfo *PSI) {
if (!NumCandidates ||
(PSI && PSI->hasProfileSummary() && !PSI->isHotCount(TotalCount)))
continue;
+
auto PromotionCandidates = getPromotionCandidatesForCallSite
@@ -277,35 +626,160 @@ CallBase &llvm::pgo::promoteIndirectCall(CallBase &CB,
Function *DirectCallee,
// Promote indirect-call to conditional direct-call for one callsite.
bool IndirectCallPromoter::tryToPromoteWithFuncCmp(
-CallBase &CB, const std::vector &Candidates,
-
https://github.com/minglotus-6 edited
https://github.com/llvm/llvm-project/pull/81442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/minglotus-6 edited
https://github.com/llvm/llvm-project/pull/81442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/minglotus-6 edited
https://github.com/llvm/llvm-project/pull/81442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -56,6 +56,7 @@ Error thinBackend(const Config &C, unsigned Task, AddStreamFn
AddStream,
const FunctionImporter::ImportMapTy &ImportList,
const GVSummaryMapTy &DefinedGlobals,
MapVector *ModuleMap,
+ bool
@@ -0,0 +1,20 @@
+; RUN: llvm-as %s -o - | llvm-dis -o %t.ll
+; RUN: grep "^\^" %s >%t2
+; RUN: grep "^\^" %t.ll >%t3
+; Expect that the summary information is the same after round-trip through
+; llvm-as and llvm-dis.
+; RUN: diff -b %t2 %t3
+
+target triple = "aarch64-unknown-li
https://github.com/mingmingl-llvm edited
https://github.com/llvm/llvm-project/pull/126336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mingmingl-llvm commented:
Thanks for the work! Do you have some stats with this change applied?
https://github.com/llvm/llvm-project/pull/126336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
https://github.com/mingmingl-llvm created
https://github.com/llvm/llvm-project/pull/119791
None
>From a996d55a1876e53f42978a6ff32fda86c3b062fe Mon Sep 17 00:00:00 2001
From: mingmingl
Date: Thu, 12 Dec 2024 16:11:30 -0800
Subject: [PATCH] [docs]Fix a typo around '#pragma clang section'
---
c
https://github.com/mingmingl-llvm closed
https://github.com/llvm/llvm-project/pull/119791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mingmingl-llvm created
https://github.com/llvm/llvm-project/pull/124991
None
>From 755b5d07f8fb792793036179df72eec6bda19260 Mon Sep 17 00:00:00 2001
From: mingmingl
Date: Wed, 29 Jan 2025 13:17:11 -0800
Subject: [PATCH 1/2] [Clang]Add -fpartition-static-data-section
---
cl
https://github.com/mingmingl-llvm created
https://github.com/llvm/llvm-project/pull/122860
None
>From 4d095938962f078f1b1d6d35c28f5fbae4a1349d Mon Sep 17 00:00:00 2001
From: mingmingl
Date: Mon, 13 Jan 2025 21:32:15 -0800
Subject: [PATCH] [NFC]Update -fsplit-machine-functions now aarch64 funct
https://github.com/mingmingl-llvm edited
https://github.com/llvm/llvm-project/pull/122860
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mingmingl-llvm closed
https://github.com/llvm/llvm-project/pull/122860
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mingmingl-llvm wrote:
thanks for taking a look!
https://github.com/llvm/llvm-project/pull/122860
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -911,6 +916,63 @@ static void setLiveRoot(ModuleSummaryIndex &Index,
StringRef Name) {
Summary->setLive(true);
}
+// Return true if the User U is reachable from a non-vtable user
+// through the use-def chain.
+static bool hasNonVTableUsers(const User *U, CXXABI *ABI
https://github.com/mingmingl-llvm edited
https://github.com/llvm/llvm-project/pull/126336
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/mingmingl-llvm commented:
I tried this patch on an internal data center application and it reduced the
`.data.rel.ro` section size by 3.69% and the number of `_ZTS` or `_ZTI`
prefixed entries by ~27% ~ 28%.
Despite the good size savings, the numbers make me curious about wha
@@ -911,6 +916,63 @@ static void setLiveRoot(ModuleSummaryIndex &Index,
StringRef Name) {
Summary->setLive(true);
}
+// Return true if the User U is reachable from a non-vtable user
+// through the use-def chain.
+static bool hasNonVTableUsers(const User *U, CXXABI *ABI
@@ -0,0 +1,49 @@
+#include "llvm/Transforms/IPO/DeadRTTIElimination.h"
+#include "llvm/ADT/Statistic.h"
+#include "llvm/IR/ModuleSummaryIndex.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/LibCXXABI.h"
+
+using namespace llvm;
+
+#define DEBUG_TYPE "dre"
+
+STATISTIC(
@@ -0,0 +1,20 @@
+; RUN: llvm-as %s -o - | llvm-dis -o %t.ll
+; RUN: grep "^\^" %s >%t2
+; RUN: grep "^\^" %t.ll >%t3
+; Expect that the summary information is the same after round-trip through
+; llvm-as and llvm-dis.
+; RUN: diff -b %t2 %t3
+
+target triple = "aarch64-unknown-li
mingmingl-llvm wrote:
> > Taking a further look shows these preserved RTTIs come from vtables whose
> > superclass has its type-id accessed.
>
> Thank you for helping evaluate this patch. I am curious about what these type
> IDs is used for—is it for dynamic_cast, exception handling, or the ty
https://github.com/mingmingl-llvm updated
https://github.com/llvm/llvm-project/pull/124991
>From 755b5d07f8fb792793036179df72eec6bda19260 Mon Sep 17 00:00:00 2001
From: mingmingl
Date: Wed, 29 Jan 2025 13:17:11 -0800
Subject: [PATCH 1/2] [Clang]Add -fpartition-static-data-section
---
clang/in
301 - 339 of 339 matches
Mail list logo