-
Notifications
You must be signed in to change notification settings - Fork 47k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[compiler] Visit nested scopes in pruned scopes in PromoteUsedTemporaries #30537
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
PromoteUsedTemporaries While debugging #30536 I happened to notice that the bug only reproduced when there was interleaving scopes, and observed that an unpruned scope nested inside of a pruned one was not being visited by CollectPromotableTemporaries, which keeps track of which identifiers should be promoted later. Therefore when actually promoting temporaries we were skipping over the identifiers in children of pruned scopes ghstack-source-id: d805f62f22fda04beedb6c7063312451f36d678c Pull Request resolved: #30537
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!! It looks like RenameVariables
already visits instructions within pruned scopes, so this seems to be the only edge case
…ries While debugging #30536 I happened to notice that the bug only reproduced when there was interleaving scopes, and observed that an unpruned scope nested inside of a pruned one was not being visited by CollectPromotableTemporaries, which keeps track of which identifiers should be promoted later. Therefore when actually promoting temporaries we were skipping over the identifiers in children of pruned scopes ghstack-source-id: d805f62f22fda04beedb6c7063312451f36d678c Pull Request resolved: #30537
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, nice catch!
…ries While debugging #30536 I happened to notice that the bug only reproduced when there was interleaving scopes, and observed that an unpruned scope nested inside of a pruned one was not being visited by CollectPromotableTemporaries, which keeps track of which identifiers should be promoted later. Therefore when actually promoting temporaries we were skipping over the identifiers in children of pruned scopes ghstack-source-id: d805f62f22fda04beedb6c7063312451f36d678c Pull Request resolved: #30537
Stack from ghstack (oldest at bottom):
While debugging #30536 I happened to notice that the bug only reproduced
when there was interleaving scopes, and observed that an unpruned scope
nested inside of a pruned one was not being visited by
CollectPromotableTemporaries, which keeps track of which identifiers
should be promoted later. Therefore when actually promoting temporaries
we were skipping over the identifiers in children of pruned scopes