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

Split and parameterize Core.Compiler.optimize #38287

Merged
merged 2 commits into from
Nov 21, 2020
Merged

Split and parameterize Core.Compiler.optimize #38287

merged 2 commits into from
Nov 21, 2020

Conversation

vchuravy
Copy link
Member

@vchuravy vchuravy commented Nov 3, 2020

I want to experiment with new compiler passes out-of-tree and for that I need to specialize optimize on the AbstractInterpreter.
I also split optimize into two functions to make re-use easier.

@vchuravy vchuravy requested a review from Keno November 3, 2020 01:50
@vchuravy
Copy link
Member Author

@Keno or @vtjnash any objections? Otherwise I will merge this in the coming days.

@Keno
Copy link
Member

Keno commented Nov 15, 2020

Ok by me, but I've been mostly holding off on compiler work until the 1.6 branch to avoid delaying that any further.

@Roger-luo
Copy link
Contributor

Roger-luo commented Nov 15, 2020

I'm wondering if we could also have run_passes have a interp parameters too if optimize is dispatched on interp? I'm inserting some optimization passes after Julia compiler's (currently I copy-pasta typeinf) This PR is also useful on my side.

NVM. I just realized I can put it before finish…

@vchuravy
Copy link
Member Author

Ok by me, but I've been mostly holding off on compiler work until the 1.6 branch to avoid delaying that any further.

Yeah I think Tim and I would like to use the AbstractInterpreter work in 1.6 to have a split inference and inference caches for the GPUCompiler work. (This PR is not required for that, but #38370 is)

@Roger-luo
Copy link
Contributor

Ok by me, but I've been mostly holding off on compiler work until the 1.6 branch to avoid delaying that any further.

I'm copy-pasting the _typeinf to dispatch custom optimization pass after typeinf and optimize (https://github.com/QuantumBFS/YaoCompiler.jl/blob/master/src/compiler/optimize.jl), it's not urgent but it would be great if this PR gets merged in 1.6, so I can release a version without copying code from Julia compiler once 1.6 released.

@vchuravy
Copy link
Member Author

I'm copy-pasting the

:) yeah I was to lazy to do that in https://github.com/vchuravy/KernelCompiler.jl/blob/main/src/optimize.jl

@vchuravy vchuravy merged commit f805448 into master Nov 21, 2020
@vchuravy vchuravy deleted the vc/compiler++ branch November 21, 2020 15:46
timholy added a commit to JuliaDebug/Cthulhu.jl that referenced this pull request Nov 28, 2020
timholy added a commit to JuliaDebug/Cthulhu.jl that referenced this pull request Nov 28, 2020
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.

3 participants