xdslproject / xdsl

A Python Compiler Design Toolkit
Other
252 stars 67 forks source link

Create a graph of SSAValues with edges if they are alive at the same time #1352

Open superlopuh opened 1 year ago

kingiler commented 1 year ago

I'm not sure but it seems we want something like hypergraph?

tobiasgrosser commented 1 year ago

I am not sure what is this about? Seems to have too little context to really explain what this is about?

math-fehr commented 1 year ago

I believe you want this because of register allocation?

superlopuh commented 1 year ago

The main idea here was to have a function that takes an arbitrary IR, and returns a graph between SSA values if there exists a point in time during execution when they have both been initialised and will be used in the future. This can be used for register allocation, register allocation validation, and maybe other things also.

tobiasgrosser commented 1 year ago

I feel that might be worth chatting about in person. I feel pushing currently in this direction will be a distracting. My intuition is that the ssa encoding already offers such a graph. Maybe we can have a label crazy-idea or sth. 😀

superlopuh commented 1 year ago

Yes happy to chat about this.

superlopuh commented 10 months ago

This isn't really relevant any more, but would be nice to have for debugging future register allocations for RISC-V and beyond. Removing from matmul to Snitch project.