tshort / StaticCompiler.jl

Compiles Julia code to a standalone library (experimental)
Other
490 stars 31 forks source link

Use Enzyme's optimization and late lowering mechanisms #63

Closed MasonProtter closed 2 years ago

MasonProtter commented 2 years ago

I learned that apparently you're not supposed to run Julia's optimization pipeline twice, so instead I'm taking some code from Enzyme.jl that mirror's julia's optimization and late lowering steps. This makes it easy for me to get the relocation table between the optimization and post-optimization steps which for now, I think is the right time to do it.

This doesn't seem to introduce any observable differences in the cases I've tested.

chriselrod commented 2 years ago

I learned that apparently you're not supposed to run Julia's optimization pipeline twice

Out of curiosity, does this introduce correctness issues, or just waste (compile) time?

brenhinkeller commented 2 years ago

TIL! Interesting...

MasonProtter commented 2 years ago

Out of curiosity, does this introduce correctness issues, or just waste (compile) time?

It is incorrect according to @vchuravy