# Compiler tools and workflow for compiler optimization

**URL:** <https://discourse.julialang.org/t/compiler-tools-and-workflow-for-compiler-optimization/100016>\
**Category:** Internals & Design\
**Created:** [June 7, 2023, 6:31pm UTC](https://discourse.julialang.org/t/compiler-tools-and-workflow-for-compiler-optimization/100016 "2023-06-07T18:31:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![martin.d.maas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martin.d.maas/32/50964_2.png) [@martin.d.maas](https://discourse.julialang.org/u/martin.d.maas)\
**Post date:** [June 7, 2023, 11:50pm UTC](https://discourse.julialang.org/t/compiler-tools-and-workflow-for-compiler-optimization/100016/3 "2023-06-07T23:50:12Z")

</div>

> [@ToucheSir](#):
>
> Congrats on taking the plunge! The good news is that many people have gone through the same journey. The bad news is that most of us are stuck at roughly the same place you are 😅. I know you replied on the thread, but there’s a reason [Why are compiler devs in such high demand for Julia? - #10 by jpsamaroo](https://discourse.julialang.org/t/why-are-compiler-devs-in-such-high-demand-for-julia/99420/10) is so important!

Yes, this is a kind of a follow-up from that thread. I pretty much relate to what @mrufsvold said there.

> [@Why are compiler devs in such high demand for Julia?](https://discourse.julialang.org/t/why-are-compiler-devs-in-such-high-demand-for-julia/99420/26):
>
> I find that a blocker for me in getting started contributing to core things is finding the entry points for the code.

So thanks for sharing the state of the art!

The compiler plugin project was exactly was I was hoping for… The design docs really summarize the situation (at least of two years ago) and a good plan looking forward.

I’ll take a look at opaque closures and maybe at how Diffractor.jl uses them.

As for AbstractInterpreter, what’s the story? I think `Base.code_ircode` already gives me the optimized IR, and is internally calling some interpreter.

I guess at some point I will stop looking for tools and just try to hack at whatever I want to do.

I’m interested in performance optimization. For example, I’m intrigued by how better escape analysis (and shape inference) could lead to more stack allocations of otherwise GC-ed variables.

I would also like to contribute to static compilation, and I found StaticCompiler.jl to be too much of a hack, as it uses the GPU Compiler pipeline, and I don’t understand why you can’t just use the native pipeline. I guess it would be better supported in the long run in that case. In that regard, I found [Compiler3 static.jl](https://github.com/Keno/Compiler3.jl/blob/master/exploration/static.jl) very interesting. It ccalls `jl_create_native` to generate an .o file of a single function.

In any case, if I manage to do any of this, I’ll try to make sure to document properly.

---

_[View the full topic](https://discourse.julialang.org/t/compiler-tools-and-workflow-for-compiler-optimization/100016)._
