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

backport #42125: Allow constant-propagation to be disabled #42280

Closed
wants to merge 1 commit into from

Conversation

simeonschaub
Copy link
Member

This needed to be backported manually.

Our heuristics for constant propagation are imperfect (and probably
never will be perfect), and I've now seen many examples of
methods that no developer would ask to have const-propped get
that treatment. In some cases the cost for latency/precompilation
is very large. This renames `@aggressive_constprop` to `@constprop`
and allows two settings, `:aggressive` and `:none`.

Closes #38983

Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
@KristofferC
Copy link
Member

This feels a lot like a feature? Why shouldn't it adhere to the feature freeze like the other features?

@simeonschaub
Copy link
Member Author

I thought that was the conclusion in #42188, but reading it again, I might have misunderstood. It does still have the backport label at least. I definitely share the concern, so this may not be a good idea at this point. @timholy @aviatesk Was that the conclusion, or do you still think that PR should be backported?

@Keno
Copy link
Member

Keno commented Sep 16, 2021

We don't have to backport the feature, but I'd support backporting the new macro name, because a bunch of packages have already updated to the breakage on master and would need to be un-updated.

@simeonschaub
Copy link
Member Author

I think it may just break Diffractor, for the other packages I made it dependent on isdefined(Base, Symbol("@constprop")), which would just mean that 1.7 is slower than master.

@KristofferC
Copy link
Member

because a bunch of packages have already updated to the breakage on master and would need to be un-updated.

I think they can just load Compat.

@Keno
Copy link
Member

Keno commented Sep 16, 2021

Ok. We can fix Diffractor, but it does seem odd to release something with a name that's already been removed on master. I don't feel strongly though. Up to @KristofferC I say, but @simeonschaub maybe you could put up a version that just uses the new macro name, but only supports the aggressive option for 1.7? Should be a two line change.

@simeonschaub
Copy link
Member Author

So basically the thing that's currently defined in Compat?

@KristofferC
Copy link
Member

Aren't there packages that use the old name?

@timholy
Copy link
Member

timholy commented Sep 16, 2021

Not anymore, they've all been updated to the new name or commented out. Last vestige I think is mcabbott/TransmuteDims.jl#33, and I didn't check when it was commented out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants