[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/90237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revise the modules document for clarity (PR #90237)

2024-04-27 Thread Chuanqi Xu via cfe-commits
@@ -530,43 +527,43 @@ Now the linkage name of ``NS::foo()`` will be ``_ZN2NS3fooEv``. Module Initializers ~~~ -All the importable module units are required to emit an initializer function. -The initializer function should contain calls to importing modules fir

[clang] [llvm] [Pipelines] Do not run CoroSplit and CoroCleanup in LTO pre-link pipeline (PR #90310)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Feel not bad. https://github.com/llvm/llvm-project/pull/90310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Detect ODR mismatches for enums in non-C++ like in C++. (PR #90298)

2024-04-27 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. I have no idea why it was. But the current change looks pretty fine to me. https://github.com/llvm/llvm-project/pull/90298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Rebased with main. https://github.com/llvm/llvm-project/pull/83108 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/83108 >From be1c83fb885536c3e65657c6549bd20dd29d9649 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 7 Jan 2018 15:16:11 +0200 Subject: [PATCH 1/3] D41416: [modules] [pch] Do not deserialize all lazy temp

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Given we're pursuing https://github.com/llvm/llvm-project/pull/83237 series. I'll close this one. https://github.com/llvm/llvm-project/pull/76774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [Serialization] Load Specializations Lazily (PR #76774)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed 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

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-25 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > The changes LGTM, don't want to block this on my remaining nits. Thanks for reviewing this. > > I believe @Bigcheese wanted to test test impact on PCM size on our side > before this lands. I've rebased this with main. I'll wait for the results from @Bigcheese https://gi

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-25 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From 2c20a6200fb2790b3a891ffc8c43682c113c7e8a Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH] [Modules] No transitive source location change --- clang/includ

[clang] fe47e8f - [NFC] [ASTUnit] [Serialization] Transalte local decl ID to global decl ID before consuming

2024-04-25 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-25T15:55:46+08:00 New Revision: fe47e8ff3ae7fc8975eaade6bfa6679737c28b93 URL: https://github.com/llvm/llvm-project/commit/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93 DIFF: https://github.com/llvm/llvm-project/commit/fe47e8ff3ae7fc8975eaade6bfa6679737c28b93.diff LO

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-24 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/89873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/89873 >From d83b9cda6c7d943e90c324fa2c1c7e7ffaf88e1c Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 24 Apr 2024 13:35:01 +0800 Subject: [PATCH] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/89873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Move DeclID from serialization/ASTBitCodes.h to AST/DeclID.h (PR #89873)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/89873 Previously, the DeclID is defined in serialization/ASTBitCodes.h under clang::serialization namespace. However, actually the DeclID is not purely used in serialization part. The DeclID is already widely used

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-23 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @rjmccall @dwblaikie ping https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 commented: The higher level idea looks fine. https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
@@ -1523,24 +1442,16 @@ struct SwitchCoroutineSplitter { createResumeEntryBlock(F, Shape); auto *ResumeClone = -createClone(F, ".resume", Shape, CoroCloner::Kind::SwitchResume); +createClone(F, ".resume", Shape, CoroCloner::Kind::SwitchResume, TTI);

[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/89751 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] coroutine: generate valid mangled name in CodeGenFunction::generateAwaitSuspendWrapper (PR #89731)

2024-04-23 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/89731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b467c6b - [NFC] [Serialization] Turn type alias GlobalDeclID into a class

2024-04-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-23T17:52:58+08:00 New Revision: b467c6b53660dcaa458c2b5d7fbf5f93ee2af910 URL: https://github.com/llvm/llvm-project/commit/b467c6b53660dcaa458c2b5d7fbf5f93ee2af910 DIFF: https://github.com/llvm/llvm-project/commit/b467c6b53660dcaa458c2b5d7fbf5f93ee2af910.diff LO

[clang] b8e3b2a - [NFC] [Serialization] Turn type alias LocalDeclID into class

2024-04-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-23T16:56:14+08:00 New Revision: b8e3b2ad66cf78ad2b7832577b1d58dc93c5da21 URL: https://github.com/llvm/llvm-project/commit/b8e3b2ad66cf78ad2b7832577b1d58dc93c5da21 DIFF: https://github.com/llvm/llvm-project/commit/b8e3b2ad66cf78ad2b7832577b1d58dc93c5da21.diff LO

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @jansvoboda11 @Bigcheese ping https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aac695d - [NFC] [Serialization] Use semantical type 'DeclID' for 'CreateDeserialized'

2024-04-19 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-19T16:24:47+08:00 New Revision: aac695da42cf48ccb29c2fe495ead564cc913471 URL: https://github.com/llvm/llvm-project/commit/aac695da42cf48ccb29c2fe495ead564cc913471 DIFF: https://github.com/llvm/llvm-project/commit/aac695da42cf48ccb29c2fe495ead564cc913471.diff LO

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-18 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From ddb4074b0460daf7b42531ec62e97347b3f2e14d Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH 1/4] [Modules] No transitive source location change --- clang/in

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-18 Thread Chuanqi Xu via cfe-commits
@@ -4082,14 +4069,14 @@ void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const { : ModuleMgr.lookupByFileName(Name)); if (!OM) { std::string Msg = - "SourceLocation remap refers to unknown module, cannot find "; + "cannot

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-18 Thread Chuanqi Xu via cfe-commits
@@ -2221,33 +,45 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-18 Thread Chuanqi Xu via cfe-commits
@@ -2220,33 +2221,40 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] aac4d03 - [C++20] [Modules] Mark exported all declarations as used

2024-04-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-19T09:46:18+08:00 New Revision: aac4d03423dd6b7bdef0f2eb03c570f3e2ca6630 URL: https://github.com/llvm/llvm-project/commit/aac4d03423dd6b7bdef0f2eb03c570f3e2ca6630 DIFF: https://github.com/llvm/llvm-project/commit/aac4d03423dd6b7bdef0f2eb03c570f3e2ca6630.diff LO

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-18 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Fix conflicts and rebase with main. @Bigcheese @jansvoboda11 ping~ https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e7a8dd9 - [docs] [C++20] [Modules] Mentioning Module Initializer

2024-04-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-18T16:12:14+08:00 New Revision: e7a8dd9b0d419403fe1d8adeb177a4ec78e036cc URL: https://github.com/llvm/llvm-project/commit/e7a8dd9b0d419403fe1d8adeb177a4ec78e036cc DIFF: https://github.com/llvm/llvm-project/commit/e7a8dd9b0d419403fe1d8adeb177a4ec78e036cc.diff LO

[clang] 5d4e072 - [C++20] [Modules] [Reduced BMI] Don't eagerly write static entities in

2024-04-18 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-18T15:38:02+08:00 New Revision: 5d4e072a253afac018e312d75290314bd2d03b30 URL: https://github.com/llvm/llvm-project/commit/5d4e072a253afac018e312d75290314bd2d03b30 DIFF: https://github.com/llvm/llvm-project/commit/5d4e072a253afac018e312d75290314bd2d03b30.diff LO

[clang] 7ec342b - [C++20] [Modules] [Reduced BMI] Write Special Decl Lazily

2024-04-17 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-18T14:35:38+08:00 New Revision: 7ec342ba16ca97206aa2ddd5b7ec0da063042e03 URL: https://github.com/llvm/llvm-project/commit/7ec342ba16ca97206aa2ddd5b7ec0da063042e03 DIFF: https://github.com/llvm/llvm-project/commit/7ec342ba16ca97206aa2ddd5b7ec0da063042e03.diff LO

[clang] 83cc605 - [NFC] [Serialization] Extract logics to write special decls from

2024-04-17 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-18T14:34:24+08:00 New Revision: 83cc60565a8a78ce00ee0c29f167400902e60737 URL: https://github.com/llvm/llvm-project/commit/83cc60565a8a78ce00ee0c29f167400902e60737 DIFF: https://github.com/llvm/llvm-project/commit/83cc60565a8a78ce00ee0c29f167400902e60737.diff LO

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-17 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @rjmccall @dwblaikie ping https://github.com/llvm/llvm-project/pull/75912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f2695a1 - [C++20] [Modules] Avoid writing untouched DeclUpdates from GMF in

2024-04-17 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-18T11:00:28+08:00 New Revision: f2695a1c2f561da42b973187a254b6eeb7da76a9 URL: https://github.com/llvm/llvm-project/commit/f2695a1c2f561da42b973187a254b6eeb7da76a9 DIFF: https://github.com/llvm/llvm-project/commit/f2695a1c2f561da42b973187a254b6eeb7da76a9.diff LO

[clang] e6ecff8 - [C++20] [Modules] Add Release Notes and Documents for Reduced BMI

2024-04-16 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-17T10:42:48+08:00 New Revision: e6ecff8d95b9175e70e0d43e14c2975c8f69d718 URL: https://github.com/llvm/llvm-project/commit/e6ecff8d95b9175e70e0d43e14c2975c8f69d718 DIFF: https://github.com/llvm/llvm-project/commit/e6ecff8d95b9175e70e0d43e14c2975c8f69d718.diff LO

[clang] d26dd58 - [StmtProfile] Don't profile the body of lambda expressions

2024-04-16 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-16T15:41:26+08:00 New Revision: d26dd58ca5b59032eb371b8f51d9134acdd8d3ad URL: https://github.com/llvm/llvm-project/commit/d26dd58ca5b59032eb371b8f51d9134acdd8d3ad DIFF: https://github.com/llvm/llvm-project/commit/d26dd58ca5b59032eb371b8f51d9134acdd8d3ad.diff LO

[clang] 39016e3 - [C++20] [Modules] Don't import non-inline function bodies even if it is always-inline

2024-04-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-16T13:06:44+08:00 New Revision: 39016e33b0fe78ddb1f11822f71a8a233af4dca9 URL: https://github.com/llvm/llvm-project/commit/39016e33b0fe78ddb1f11822f71a8a233af4dca9 DIFF: https://github.com/llvm/llvm-project/commit/39016e33b0fe78ddb1f11822f71a8a233af4dca9.diff LO

[clang] [clang] Drop unaligned from calls to readNext (NFC) (PR #88842)

2024-04-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. https://github.com/llvm/llvm-project/pull/88842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [unused-includes] PCHContainerOperations uses MemoryBufferRef, not MemoryBuffer. NFC. (PR #88794)

2024-04-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/88794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [unused-includes][Serialization] Remove unused includes. NFC. (PR #88790)

2024-04-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/88790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -149,14 +157,44 @@ class SourceLocationSequence::State { operator SourceLocationSequence *() { return &Seq; } }; -inline uint64_t SourceLocationEncoding::encode(SourceLocation Loc, - SourceLocationSequence *Seq) { - return Se

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -2220,33 +2221,40 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -2220,33 +2221,40 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From 8e07cbdd0f348484d532d7827e4b4a7888e70978 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH 1/3] [Modules] No transitive source location change --- clang/in

[clang] aa27414 - Revert "[C++20] [Modules] Don't import non-inline function bodies even if it is marked as always_inline"

2024-04-15 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-15T17:06:03+08:00 New Revision: aa2741449c3609b2ae244d8d3f3e14ad16de72e4 URL: https://github.com/llvm/llvm-project/commit/aa2741449c3609b2ae244d8d3f3e14ad16de72e4 DIFF: https://github.com/llvm/llvm-project/commit/aa2741449c3609b2ae244d8d3f3e14ad16de72e4.diff LO

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > I have a few minor comments on the patch. I want to do some additional perf > testing on module scanning perf because I'm a bit concerned about the cost of > `ASTWriter::getRawSourceLocationEncoding`. What's the perf results about scanning? https://github.com/llvm/llvm-pro

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -2220,40 +2227,47 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -2220,40 +2227,47 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -4078,8 +4065,8 @@ void ASTReader::ReadModuleOffsetMap(ModuleFile &F) const { return; ChuanqiXu9 wrote: Done. https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -2220,40 +2227,47 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -149,14 +157,44 @@ class SourceLocationSequence::State { operator SourceLocationSequence *() { return &Seq; } }; -inline uint64_t SourceLocationEncoding::encode(SourceLocation Loc, - SourceLocationSequence *Seq) { - return Se

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -149,14 +157,44 @@ class SourceLocationSequence::State { operator SourceLocationSequence *() { return &Seq; } }; -inline uint64_t SourceLocationEncoding::encode(SourceLocation Loc, - SourceLocationSequence *Seq) { - return Se

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -696,7 +696,7 @@ class ASTReader /// Mapping from global submodule IDs to the module file in which the /// submodule resides along with the offset that should be added to the /// global submodule ID to produce a local ID. - GlobalSubmoduleMapType GlobalSubmoduleMap; +

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -2220,40 +2227,47 @@ class ASTReader return Sema::AlignPackInfo::getFromRawEncoding(Raw); } + using RawLocEncoding = SourceLocationEncoding::RawLocEncoding; + /// Read a source location from raw form and return it in its /// originating module file's source loc

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -5574,10 +5577,34 @@ void ASTWriter::AddFileID(FileID FID, RecordDataImpl &Record) { Record.push_back(getAdjustedFileID(FID).getOpaqueValue()); } +SourceLocationEncoding::RawLocEncoding +ASTWriter::getRawSourceLocationEncoding(SourceLocation Loc, LocSeq *Seq) { + unsign

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -942,6 +942,12 @@ class ASTReader /// Sema tracks these to emit deferred diags. llvm::SmallSetVector DeclsToCheckForDeferredDiags; + /// The module files imported by different module files. Indirectly imported + /// module files are included too. The information comes

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
@@ -149,14 +157,44 @@ class SourceLocationSequence::State { operator SourceLocationSequence *() { return &Seq; } }; -inline uint64_t SourceLocationEncoding::encode(SourceLocation Loc, - SourceLocationSequence *Seq) { - return Se

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-15 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From 8e07cbdd0f348484d532d7827e4b4a7888e70978 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH 1/2] [Modules] No transitive source location change --- clang/in

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-04-14 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > @sam-mccall gentle ping~ > > @ChuanqiXu9 hi, can your patch add support msvc module with *.ixx suffix > source? I use xmake to generate compile database, clangd cant work properly. hi, did you meet problems when testing this? I took a quick look and I don't see I treated

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-04-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/66462 >From 32010ae7e0a47cd4a70a9401980b32ed1d3e10f6 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Fri, 15 Sep 2023 11:33:53 +0800 Subject: [PATCH] [clangd] [C++20] [Modules] Introduce initial support for C++20 M

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Thanks for reviewing. https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
@@ -1061,6 +1070,16 @@ CodeGenAction::CreateASTConsumer(CompilerInstance &CI, StringRef InFile) { CI.getPreprocessor().addPPCallbacks(std::move(Callbacks)); } + if (CI.getFrontendOpts().GenReducedBMI && + !CI.getFrontendOpts().ModuleOutputPath.empty()) { +std:

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
@@ -4045,6 +4045,24 @@ static bool RenderModulesOptions(Compilation &C, const Driver &D, // module fragment. CmdArgs.push_back("-fskip-odr-check-in-gmf"); + if (Args.hasArg(options::OPT_modules_reduced_bmi) && + (Input.getType() == driver::types::TY_CXXModule || +

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-14 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 59f281786a8c84ecfd7f5ddcfce6251c43ef2c72 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/include

[clang] [C++20] [Modules] [Reduced BMI] Remove unreachable decls GMF in redued BMI (PR #88359)

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

[clang] [C++20] [Modules] [Reduced BMI] Remove unreachable decls GMF in redued BMI (PR #88359)

2024-04-11 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/88359 >From 8913b259eb34db1f1d34d7f53f125c65c58ea353 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Wed, 3 Apr 2024 13:14:07 +0800 Subject: [PATCH] [C++20] [Modules] [Reduced BMI] Remove unreachable decls GMF in r

[clang] [C++20] [Modules] [Reduced BMI] Remove unreachable decls GMF in redued BMI (PR #88359)

2024-04-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 ready_for_review https://github.com/llvm/llvm-project/pull/88359 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] [Reduced BMI] Remove unreachable decls GMF in redued BMI (PR #88359)

2024-04-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/88359 Following of https://github.com/llvm/llvm-project/pull/76930 This follows the idea of "only writes what we writes", which I think is the most natural and efficient way to implement this optimization. We star

[clang] 75edf0c - [NFC] [Serialization] Avoid accessing PendingBodies as much as possible

2024-04-10 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-11T11:08:58+08:00 New Revision: 75edf0c18c777d69df7cfc6462e5233649bd47d4 URL: https://github.com/llvm/llvm-project/commit/75edf0c18c777d69df7cfc6462e5233649bd47d4 DIFF: https://github.com/llvm/llvm-project/commit/75edf0c18c777d69df7cfc6462e5233649bd47d4.diff LO

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-10 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Could you share the rest of the "no transitive change" patches, or at least > their outline? I'm curious what else goes into making that work. Oh, I haven't started them. The patch in my mind includes two at least: (1) Add a new block recording the semantical hash value of t

[clang] 45aec9a - [NFC] [Serialization] Remove redundant hasPendingBody member

2024-04-09 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-09T17:50:23+08:00 New Revision: 45aec9a0b54e6d87abf75e960c96f59408edc706 URL: https://github.com/llvm/llvm-project/commit/45aec9a0b54e6d87abf75e960c96f59408edc706 DIFF: https://github.com/llvm/llvm-project/commit/45aec9a0b54e6d87abf75e960c96f59408edc706.diff LO

[clang] [Clang] Reduce the size of Decl and classes derived from it (PR #87361)

2024-04-08 Thread Chuanqi Xu via cfe-commits
@@ -268,17 +268,34 @@ class alignas(8) Decl { /// } /// void A::f(); // SemanticDC == namespace 'A' ///// LexicalDC == global namespace - llvm::PointerUnion DeclCtx; + llvm::PointerIntPair< ChuanqiXu9 wrote: +1 for more comments. I

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-04-06 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/83108 >From 2a9dfdab30467bef5361cea743be0dc215011685 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 7 Jan 2018 15:16:11 +0200 Subject: [PATCH 1/3] D41416: [modules] [pch] Do not deserialize all lazy temp

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Rebase with main and enabling the sequence optimization when the module file index is 0. Now the size of the PCMs goes to 204M (originally it is 200M). It looks better. @jansvoboda11 @Bigcheese ping https://github.com/llvm/llvm-project/pull/86912

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-06 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 edited https://github.com/llvm/llvm-project/pull/86912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] No transitive source location change (PR #86912)

2024-04-06 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/86912 >From 8e07cbdd0f348484d532d7827e4b4a7888e70978 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 18 Mar 2024 08:36:55 +0800 Subject: [PATCH] [Modules] No transitive source location change --- clang/includ

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-06 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 7b0b9b52ac06a78a172e3628ab7fb3cdb3749d13 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/include

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-06 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Rebased with main. @dwblaikie may you have more comments? https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-06 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 8c51aa534a20655a6a86a84f1050efd850130afd Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/include

[clang] 37eb0d4 - [NFC] Check the nullness of pointer before dereference it in the assertion

2024-04-03 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-03T16:39:02+08:00 New Revision: 37eb0d4948dad6d2399915fde6eb5800c3fe825b URL: https://github.com/llvm/llvm-project/commit/37eb0d4948dad6d2399915fde6eb5800c3fe825b DIFF: https://github.com/llvm/llvm-project/commit/37eb0d4948dad6d2399915fde6eb5800c3fe825b.diff LO

[clang] 72c29fa - [C++20] [Modules] [Driver] Emit unused argument warning if we use '-fmodule-output' with non-module input

2024-04-03 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-03T16:28:05+08:00 New Revision: 72c29fa9e226a928b3d3a01d74f6b44a0b31b7d4 URL: https://github.com/llvm/llvm-project/commit/72c29fa9e226a928b3d3a01d74f6b44a0b31b7d4 DIFF: https://github.com/llvm/llvm-project/commit/72c29fa9e226a928b3d3a01d74f6b44a0b31b7d4.diff LO

[clang] 468dc32 - [NFC] Make `DeclContext::noload_lookup()` accept transparent context

2024-04-03 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-03T15:03:07+08:00 New Revision: 468dc32ff55d19f55132cbcc4d6ceb1f6d1c12cf URL: https://github.com/llvm/llvm-project/commit/468dc32ff55d19f55132cbcc4d6ceb1f6d1c12cf DIFF: https://github.com/llvm/llvm-project/commit/468dc32ff55d19f55132cbcc4d6ceb1f6d1c12cf.diff LO

[clang] a75b3e9 - [NFC] [Serialization] Extract logics to write decls and types into a standalone function

2024-04-03 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-03T14:55:20+08:00 New Revision: a75b3e949da588bafd521eff6d265f3ea2f854c2 URL: https://github.com/llvm/llvm-project/commit/a75b3e949da588bafd521eff6d265f3ea2f854c2 DIFF: https://github.com/llvm/llvm-project/commit/a75b3e949da588bafd521eff6d265f3ea2f854c2.diff LO

[clang] ed1cfff - [NFC] [C++20] [Modules] [Reduced BMI] Make sure the size of reduced BMI is not large than full BMI

2024-04-02 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-03T10:51:42+08:00 New Revision: ed1cfffe9b2b2d3cc9279ff83400ace156b317a2 URL: https://github.com/llvm/llvm-project/commit/ed1cfffe9b2b2d3cc9279ff83400ace156b317a2 DIFF: https://github.com/llvm/llvm-project/commit/ed1cfffe9b2b2d3cc9279ff83400ace156b317a2.diff LO

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-04-02 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Hi Andreas, thanks for looking into this. I am still confused about whether or not your new branch can fix the crash or not. For the question about the crash itself, I don't have any insight though, I feel like this is a defect in the code generator. I didn't understand why m

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -41,9 +43,10 @@ Base::~Base() {} // CHECK: @_ZTSW3Mod4Base = constant // CHECK: @_ZTIW3Mod4Base = constant -// CHECK-INLINE: @_ZTVW3Mod4Base = linkonce_odr {{.*}}unnamed_addr constant -// CHECK-INLINE: @_ZTSW3Mod4Base = linkonce_odr {{.*}}constant -// CHECK-INLINE: @_ZTIW3M

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -1483,10 +1483,15 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); - // Store (what we currently believe to be) the key function to avoid - // deserializing every method so we can c

[clang] [C++20] [Modules] [Itanium ABI] Generate the vtable in the module unit of dynamic classes (PR #75912)

2024-04-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/75912 >From 7399d2417a4b758fa0a98da1f99f3b4ec0eb1046 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 19 Dec 2023 17:00:59 +0800 Subject: [PATCH 1/3] [C++20] [Modules] [Itanium ABI] Generate the vtable in the m

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -3017,6 +3017,7 @@ defm prebuilt_implicit_modules : BoolFOption<"prebuilt-implicit-modules", def fmodule_output_EQ : Joined<["-"], "fmodule-output=">, Flags<[NoXarchOption]>, Visibility<[ClangOption, CC1Option]>, + MarshallingInfoString>, ChuanqiXu9 wro

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread Chuanqi Xu via cfe-commits
@@ -193,6 +193,20 @@ DwarfFissionKind getDebugFissionKind(const Driver &D, const llvm::opt::ArgList &Args, llvm::opt::Arg *&Arg); +// Calculate the output path of the module file when compiling a module

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 updated https://github.com/llvm/llvm-project/pull/85050 >From 79706501a7a3f0f2e0e9c9411bdd5e00e34ae175 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Tue, 12 Mar 2024 17:26:49 +0800 Subject: [PATCH 1/3] [C++20] [Modules] Introduce -fgen-reduced-bmi --- clang/inc

[clang] 21f85e2 - [NFC] [C++20] [Modules] Pulling out getCXX20NamedModuleOutputPath into a seperate function

2024-04-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-02T09:58:59+08:00 New Revision: 21f85e230056172cffcaec76352e5a2019b54b86 URL: https://github.com/llvm/llvm-project/commit/21f85e230056172cffcaec76352e5a2019b54b86 DIFF: https://github.com/llvm/llvm-project/commit/21f85e230056172cffcaec76352e5a2019b54b86.diff LO

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2024-04-01 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I think the support for modules in clangd is pretty important. I posted https://discourse.llvm.org/t/rfc-directions-for-modules-support-in-clangd/78072 and let's see if we can make some progress. https://github.com/llvm/llvm-project/pull/66462

[clang] ef0291e - [NFC] [Serialization] Reordering lexcical and visible TU block after type decl offsets

2024-04-01 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-04-01T16:16:03+08:00 New Revision: ef0291e5f4451abbafab0c839bf51a6382f735f3 URL: https://github.com/llvm/llvm-project/commit/ef0291e5f4451abbafab0c839bf51a6382f735f3 DIFF: https://github.com/llvm/llvm-project/commit/ef0291e5f4451abbafab0c839bf51a6382f735f3.diff LO

[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

2024-04-01 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: I'd like to land this patch in next week if no objection comes in. https://github.com/llvm/llvm-project/pull/85050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    3   4   5   6   7   8   9   10   11   12   >