[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 }})
ChuanqiXu9 changed the title
Delay marking pending incomplete decl chains until the end of [C++20] [Modules] [Serialization] Delay marking pending incomplete decl chains until the end of finishPendingActions
.finishPendingActions
.
mpark added a commit to mpark/llvm-project that referenced this pull request
mpark changed the title
[C++20] [Modules] [Serialization] Delay marking pending incomplete decl chains until the end of [C++20][Modules][Serialization] Delay marking pending incomplete decl chains until the end of finishPendingActions
.finishPendingActions
.
… chains until the end of finishPendingActions
.
Co-authored-by: cor3ntin corentinjabot@gmail.com
mpark deleted the delay-mark-incomplete-decl-chains branch
swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request
… 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
… 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
…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
…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
tstellar pushed a commit that referenced this pull request
…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
mpark mentioned this pull request
mpark mentioned this pull request
mpark added a commit to mpark/llvm-project that referenced this pull request