[C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of finishPendingActions. by mpark · Pull Request #121245 · llvm/llvm-project (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

mpark

@ChuanqiXu9 ChuanqiXu9 changed the titleDelay marking pending incomplete decl chains until the end of finishPendingActions. [C++20] [Modules] [Serialization] Delay marking pending incomplete decl chains until the end of finishPendingActions.

Dec 31, 2024

mpark added a commit to mpark/llvm-project that referenced this pull request

Jan 29, 2025

@mpark

@mpark mpark changed the title[C++20] [Modules] [Serialization] Delay marking pending incomplete decl chains until the end of finishPendingActions. [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of finishPendingActions.

Jan 29, 2025

cor3ntin

dmpolukhin

@mpark

@mpark

… chains until the end of finishPendingActions.

@mpark @cor3ntin

Co-authored-by: cor3ntin corentinjabot@gmail.com

mizvekov

@mpark mpark deleted the delay-mark-incomplete-decl-chains branch

February 3, 2025 19:22

swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request

Feb 8, 2025

@mpark @tstellar

… chains until the end of finishPendingActions. (llvm#121245)

The call to hasBody inside finishPendingActions that bumps the PendingIncompleteDeclChains size from 0 to 1, and also sets the LazyVal->LastGeneration to 6 which matches the LazyVal->ExternalSource->getGeneration() value of 6. Later, the iterations over redecls() (which calls getNextRedeclaration) is expected to trigger the reload, but it does not since the generation numbers match.

The proposed solution is to perform the marking of incomplete decl chains at the end of finishPendingActions. This way, all of the incomplete decls are marked incomplete as a post-condition of finishPendingActions. It's also safe to delay this operation since any operation being done within finishPendingActions has NumCurrentElementsDeserializing == 1, which means that any calls to CompleteDeclChain would simply add to the PendingIncompleteDeclChains without doing anything anyway.

(cherry picked from commit a9e249f)

Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request

Feb 11, 2025

@mpark @Icohedron

… chains until the end of finishPendingActions. (llvm#121245)

The call to hasBody inside finishPendingActions that bumps the PendingIncompleteDeclChains size from 0 to 1, and also sets the LazyVal->LastGeneration to 6 which matches the LazyVal->ExternalSource->getGeneration() value of 6. Later, the iterations over redecls() (which calls getNextRedeclaration) is expected to trigger the reload, but it does not since the generation numbers match.

The proposed solution is to perform the marking of incomplete decl chains at the end of finishPendingActions. This way, all of the incomplete decls are marked incomplete as a post-condition of finishPendingActions. It's also safe to delay this operation since any operation being done within finishPendingActions has NumCurrentElementsDeserializing == 1, which means that any calls to CompleteDeclChain would simply add to the PendingIncompleteDeclChains without doing anything anyway.

zixu-w added a commit to zixu-w/llvm-project that referenced this pull request

Feb 13, 2025

@zixu-w

…ete decl chains until the end of finishPendingActions. (llvm#121245)"

This reverts commit a9e249f.

Reverting this change because of issue llvm#126973.

zixu-w added a commit that referenced this pull request

Feb 14, 2025

@zixu-w

#127136)

…ete decl chains until the end of finishPendingActions. (#121245)"

This reverts commit a9e249f.

Reverting this change because of issue #126973.

joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request

Feb 14, 2025

@zixu-w

tstellar pushed a commit that referenced this pull request

Feb 20, 2025

@zixu-w @tstellar

#127136)

…ete decl chains until the end of finishPendingActions. (#121245)"

This reverts commit a9e249f.

Reverting this change because of issue #126973.

(cherry picked from commit 912b154)

sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request

Feb 24, 2025

@zixu-w @sivan-shani

@mpark mpark mentioned this pull request

Feb 25, 2025

@mpark mpark mentioned this pull request

Mar 6, 2025

mpark added a commit to mpark/llvm-project that referenced this pull request

Mar 6, 2025

@mpark