[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks for reviewing : ) https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From c841e9cbd9510c401def4d10df6da408ae496180 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 3 Nov 2023 21:54:25 +0800 Subject: [PATCH] [NFC] [Serializer] Pack information in serializer Previously, the

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-11-03 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this in the next week if no objection come in. Since this may be safe. https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
@@ -2005,14 +2039,11 @@ void ASTWriter::WriteDeclAbbrevs() { // Decl Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext - Abv->Add(BitCodeAbbrevOp(0)); // isIn

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From ae4ee482f5b6b5d2487ed642b92e513ffd269781 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH 1/3] [Serializer] Pack bits into integers Previously, the boolean

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
@@ -2005,14 +2039,7 @@ void ASTWriter::WriteDeclAbbrevs() { // Decl Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext - Abv->Add(BitCodeAbbrevOp(0)); // isInv

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Vassil Vassilev via cfe-commits
@@ -2005,14 +2039,7 @@ void ASTWriter::WriteDeclAbbrevs() { // Decl Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // DeclContext Abv->Add(BitCodeAbbrevOp(0)); // LexicalDeclContext - Abv->Add(BitCodeAbbrevOp(0)); // isInv

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From ae4ee482f5b6b5d2487ed642b92e513ffd269781 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH 1/2] [Serializer] Pack bits into integers Previously, the boolean

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
@@ -1689,9 +1709,10 @@ void ASTDeclReader::VisitParmVarDecl(ParmVarDecl *PD) { } else { PD->setScopeInfo(scopeDepth, scopeIndex); } - PD->ParmVarDeclBits.IsKNRPromoted = Record.readInt(); - PD->ParmVarDeclBits.HasInheritedDefaultArg = Record.readInt(); - if (Record.r

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
@@ -2407,6 +2407,53 @@ class ASTReader bool isProcessingUpdateRecords() { return ProcessingUpdateRecords; } }; +/// A simple helper class to unpack an integer to bits and consuming +/// the bits in order. +class BitsUnpacker { + constexpr static uint32_t BitsIndexUpbound =

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-31 Thread Chuanqi Xu via cfe-commits
@@ -2407,6 +2407,53 @@ class ASTReader bool isProcessingUpdateRecords() { return ProcessingUpdateRecords; } }; +/// A simple helper class to unpack an integer to bits and consuming +/// the bits in order. +class BitsUnpacker { + constexpr static uint32_t BitsIndexUpbound =

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-30 Thread Vassil Vassilev via cfe-commits
@@ -2407,6 +2407,53 @@ class ASTReader bool isProcessingUpdateRecords() { return ProcessingUpdateRecords; } }; +/// A simple helper class to unpack an integer to bits and consuming +/// the bits in order. +class BitsUnpacker { + constexpr static uint32_t BitsIndexUpbound =

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-30 Thread Vassil Vassilev via cfe-commits
@@ -1689,9 +1709,10 @@ void ASTDeclReader::VisitParmVarDecl(ParmVarDecl *PD) { } else { PD->setScopeInfo(scopeDepth, scopeIndex); } - PD->ParmVarDeclBits.IsKNRPromoted = Record.readInt(); - PD->ParmVarDeclBits.HasInheritedDefaultArg = Record.readInt(); - if (Record.r

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-30 Thread Vassil Vassilev via cfe-commits
@@ -2407,6 +2407,53 @@ class ASTReader bool isProcessingUpdateRecords() { return ProcessingUpdateRecords; } }; +/// A simple helper class to unpack an integer to bits and consuming +/// the bits in order. +class BitsUnpacker { + constexpr static uint32_t BitsIndexUpbound =

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-30 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev commented: This looks pretty good modulo the comments. @zygoloid ping. https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-30 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev edited https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From ae4ee482f5b6b5d2487ed642b92e513ffd269781 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH] [Serializer] Pack bits into integers Previously, the boolean val

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-26 Thread Chuanqi Xu via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From e99fc1ab1e609d8e69c5d60b4c5df3f5563273e3 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH] [Serializer] Pack bits into integers Previously, the boolean val

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-26 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From 5a1f32f156801da271486dbb0fd37007adb4901c Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH 1/4] [NFC] [Serializer] Pack information in serializer Previously

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-25 Thread Chuanqi Xu via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-25 Thread Vassil Vassilev via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-24 Thread Chuanqi Xu via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-24 Thread Vassil Vassilev via cfe-commits
@@ -617,24 +617,27 @@ void ASTDeclReader::VisitDecl(Decl *D) { Reader.getContext()); } D->setLocation(ThisDeclLoc); - D->InvalidDecl = Record.readInt(); - if (Record.readInt()) { // hasAttrs + + uint64_t DeclBits = Record.readInt(); + D->Inval

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @zygoloid @vgvassilev ping~ Personally I feel like the change itself should be safe. (The test for modules is really sensitive about the changes in Serializer) https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/69287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From 5a1f32f156801da271486dbb0fd37007adb4901c Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH] [NFC] [Serializer] Pack information in serializer Previously, th

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-16 Thread via cfe-commits
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 12a731b5a4cfec96ba7c72888a1d76b8e13b043e d6a724d38b67f33d97d25459564c3926d72c22dc --

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/69287 >From 326bc3a4a24cfd515f2673e5a01bd30b3b1bf6bc Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 16 Oct 2023 16:41:31 +0800 Subject: [PATCH] [NFC] [Serializer] Pack information in serializer Previously, th

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Previously, the boolean values will occupy spaces that can contain integers. It wastes the spaces especially if the boolean values are serialized consecutively. The patch tries to pack such consecut

[clang] [NFC] [Serializer] Pack information in serializer (PR #69287)

2023-10-16 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/69287 Previously, the boolean values will occupy spaces that can contain integers. It wastes the spaces especially if the boolean values are serialized consecutively. The patch tries to pack such consecutive boolea