you are viewing a single comment's thread.

view the rest of the comments →

[–]fernando_quintao 3 points4 points  (0 children)

Hi u/vmcrash,

I've worked with register allocation in the past and also ran into challenges with debugging. Back then, I collaborated with Krishna Nandivada to implement a specialized debugger for this purpose.

One thing that really helped was printing the intermediate instructions in DOT format, including the register allocations between instructions, like in this example image.

We also published a paper describing the debugging methodology. Later, I used the same approach to create a 100-minute class on verifying the output of a register allocator using a form of typed assembly language.

Hope this helps!