-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
do not Copy-Propagate static variables #11238
Conversation
Thanks for your pull request, @WalterBright! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11238" |
Please add a bugzilla reference/change log entry |
@MoonlightSentinel |
@@ -580,6 +580,7 @@ private void aecpgenkill(ref GlobalOptimizer go, int flowxx) | |||
n.EV.E1.Eoper == OPvar && | |||
n.EV.E2.Eoper == OPvar && | |||
!((n.EV.E1.Ety | n.EV.E2.Ety) & (mTYvolatile | mTYshared)) && | |||
!((n.EV.E1.EV.Vsym.Sflags | n.EV.E2.EV.Vsym.Sflags) & SFLlivexit) && | |||
n.EV.E1.EV.Vsym != n.EV.E2.EV.Vsym) | |||
{ | |||
n.Nflags |= NFLaecp; |
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.
so NFLaecp stands for NFlags.AssignExp CopyPropagration?
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.
That was removed by un-merged PR #11098
Fair enough |
because it prevents caching a static in a local variable that might get enregistered.