Skip to content
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

Merged
merged 1 commit into from
Jun 15, 2020

Conversation

WalterBright
Copy link
Member

because it prevents caching a static in a local variable that might get enregistered.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Your 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 locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#11238"

@MoonlightSentinel
Copy link
Contributor

Please add a bugzilla reference/change log entry

@UplinkCoder
Copy link
Member

@MoonlightSentinel
This is a backend change and should not change language semantics in any way.

@@ -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;
Copy link
Member

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?

Copy link
Member Author

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

@MoonlightSentinel
Copy link
Contributor

This is a backend change and should not change language semantics in any way.

Fair enough

@WalterBright WalterBright merged commit bff8ed1 into dlang:master Jun 15, 2020
@WalterBright WalterBright deleted the cp-static branch June 15, 2020 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants