https://github.com/vgvassilev updated
https://github.com/llvm/llvm-project/pull/76774
>From 50fd47f2bfda527807f8cc5e46425050246868aa Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Wed, 3 Jan 2024 11:33:17 +0800
Subject: [PATCH 1/2] Load Specializations Lazily
---
clang/include/clang/AST/Decl
ChuanqiXu9 wrote:
> I failed to use spr to create stacked review... So I just create the stacked
> PR manually: #77417. Luckily the context are remained. I heard the current
> context may be lost if we change to use spr now.
https://github.com/llvm/llvm-project/pull/76774
___
@@ -527,6 +527,10 @@ class ASTWriter : public ASTDeserializationListener,
bool isLookupResultExternal(StoredDeclsList &Result, DeclContext *DC);
bool isLookupResultEntirelyExternal(StoredDeclsList &Result, DeclContext
*DC);
+ uint64_t
+ WriteSpecsLookupTable(NamedDecl *
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
Done
https://github.com/llvm/llvm-project/
ChuanqiXu9 wrote:
I failed to use spr to create stacked review... So I just create the stacked PR
manually: https://github.com/llvm/llvm-project/pull/77417
https://github.com/llvm/llvm-project/pull/76774
___
cfe-commits mailing list
cfe-commits@lists.
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/76774
>From 50fd47f2bfda527807f8cc5e46425050246868aa Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Wed, 3 Jan 2024 11:33:17 +0800
Subject: [PATCH] Load Specializations Lazily
---
clang/include/clang/AST/DeclTemp
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
vgvassilev wrote:
If the example of @hahnjo works, perhaps a
vgvassilev wrote:
> > > > This is a great way to start a new year ;)
> > > > The phab link is https://reviews.llvm.org/D41416.
> > > > In general I was wondering could we simplify the implementation by
> > > > loading the specialization hash table upon module load. That should be
> > > > relati
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
Yeah, I just saw it. My concern for reinven
https://github.com/vgvassilev edited
https://github.com/llvm/llvm-project/pull/76774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/vgvassilev edited
https://github.com/llvm/llvm-project/pull/76774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
vgvassilev wrote:
I guess the comment we are discussing is he
ChuanqiXu9 wrote:
> > > This is a great way to start a new year ;)
> > > The phab link is https://reviews.llvm.org/D41416.
> > > In general I was wondering could we simplify the implementation by
> > > loading the specialization hash table upon module load. That should be
> > > relatively cheap
vgvassilev wrote:
> > This is a great way to start a new year ;)
> > The phab link is https://reviews.llvm.org/D41416.
> > In general I was wondering could we simplify the implementation by loading
> > the specialization hash table upon module load. That should be relatively
> > cheap as we wil
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
It looks like the qualified related problem
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
I had this
https://github.com/llvm/llvm-pr
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
hahnjo wrote:
That test does not exercise an alias argument t
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
The secret why ODRHash can handle this may
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
I tried to add a test case to show the prob
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
Great analysis. Fair enough, let's find a m
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
hahnjo wrote:
The review related to `ODRHash` is this one: ht
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
ChuanqiXu9 wrote:
Interesting. I didn't recognize this. If th
@@ -2431,10 +2434,14 @@ void
ASTDeclReader::VisitClassTemplateDecl(ClassTemplateDecl *D) {
mergeRedeclarableTemplate(D, Redecl);
if (ThisDeclID == Redecl.getFirstID()) {
-// This ClassTemplateDecl owns a CommonPtr; read it to keep track of all of
-// the specializ
@@ -527,6 +527,10 @@ class ASTWriter : public ASTDeserializationListener,
bool isLookupResultExternal(StoredDeclsList &Result, DeclContext *DC);
bool isLookupResultEntirelyExternal(StoredDeclsList &Result, DeclContext
*DC);
+ uint64_t
+ WriteSpecsLookupTable(NamedDecl *
@@ -150,6 +150,11 @@ class ExternalASTSource : public
RefCountedBase {
virtual bool
FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name);
+ /// Load all the external specialzations for the Decl and the corresponding
+ /// template arguments.
+ vi
ChuanqiXu9 wrote:
> This is a great way to start a new year ;)
>
> The phab link is https://reviews.llvm.org/D41416.
>
> In general I was wondering could we simplify the implementation by loading
> the specialization hash table upon module load. That should be relatively
> cheap as we will re
@@ -527,6 +527,10 @@ class ASTWriter : public ASTDeserializationListener,
bool isLookupResultExternal(StoredDeclsList &Result, DeclContext *DC);
bool isLookupResultEntirelyExternal(StoredDeclsList &Result, DeclContext
*DC);
+ uint64_t
+ WriteSpecsLookupTable(NamedDecl *
@@ -150,6 +150,11 @@ class ExternalASTSource : public
RefCountedBase {
virtual bool
FindExternalVisibleDeclsByName(const DeclContext *DC, DeclarationName Name);
+ /// Load all the external specialzations for the Decl and the corresponding
+ /// template arguments.
+ vi
@@ -2431,10 +2434,14 @@ void
ASTDeclReader::VisitClassTemplateDecl(ClassTemplateDecl *D) {
mergeRedeclarableTemplate(D, Redecl);
if (ThisDeclID == Redecl.getFirstID()) {
-// This ClassTemplateDecl owns a CommonPtr; read it to keep track of all of
-// the specializ
@@ -1249,3 +1249,5 @@ void ODRHash::AddQualType(QualType T) {
void ODRHash::AddBoolean(bool Value) {
Bools.push_back(Value);
}
+
+void ODRHash::AddInteger(unsigned Value) { ID.AddInteger(Value); }
vgvassilev wrote:
I remember @hahnjo and @zygoloid discussing
https://github.com/vgvassilev commented:
This is a great way to start a new year ;)
The phab link is https://reviews.llvm.org/D41416.
In general I was wondering could we simplify the implementation by loading the
specialization hash table upon module load. That should be relatively cheap as
w
https://github.com/vgvassilev edited
https://github.com/llvm/llvm-project/pull/76774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/76774
>From 79cefc9f0f006acd788b6ac4e240c17d9deadf13 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Wed, 3 Jan 2024 11:33:17 +0800
Subject: [PATCH] Load Specializations Lazily
---
clang/include/clang/AST/DeclTemp
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 7a3b0cbb143d02b70b2bfae5cd40e9867c124748
af6f8ca9b739c532a489881245fac1413ec84a07 --
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/76774
>From af6f8ca9b739c532a489881245fac1413ec84a07 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Wed, 3 Jan 2024 11:33:17 +0800
Subject: [PATCH] Load Specializations Lazily
---
clang/include/clang/AST/DeclTemp
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/76774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang-modules
Author: Chuanqi Xu (ChuanqiXu9)
Changes
The idea comes from @vgvassilev and @vgvassilev had patch for
it on phab. Unfortunately phab is closed and I forgot the Dxxx number of that
patch. But I remember the last comment from @vgvassilev is
https://github.com/ChuanqiXu9 created
https://github.com/llvm/llvm-project/pull/76774
The idea comes from @vgvassilev and @vgvassilev had patch for it on phab.
Unfortunately phab is closed and I forgot the Dxxx number of that patch. But I
remember the last comment from @vgvassilev is that we s
38 matches
Mail list logo