Walter's talk on D backend

Walter Bright newshound2 at digitalmars.com
Sun Sep 22 08:35:14 UTC 2024


On 9/18/2024 5:34 AM, Dibyendu Majumdar wrote:
> I watched the talk on D backend; I thought it could have been very interesting 
> but actually was very scant in details.

Can't really do a deep dive on what should be a semester-length course in 40 
minutes. I was hoping to simply provide a roadmap to where in the code generator 
the important things were done, as otherwise it's just a confusing mass of code.


> Just because expressions are in a tree, how does it make the backend SSA? It 
> wasn't clear if the D backend uses virtual registers, and if these can be 
> assigned only once. If that is the case then are their Phi instructions?

It's like SSA in that the elem node is "assigned" a single value that never changes.


> The register allocator description also did not really explain how it works. 
> There was mention of coloring - was that a reference to graph coloring?

I don't know if it's exactly like graph coloring, but it's about preparing bit 
vectors of register use and the live range of variable (also expressed as a bit 
vector), and mapping a register onto 0's in a register's bit vector.


> It seems that there is a lot of potential for Walter to do deep dive video 
> recordings on the backend, where each topic is fully explored / explained.

I've already been asked to do one on the AArch64 implementation!


More information about the Digitalmars-d mailing list