Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're very correct but I suppose I was really answering why compilers centralize around SSA. It's a bold choice to choose one data structure for everything, and that requires more motivation than, "it makes certain optimizations really easy". Because again, it makes other stuff harder.

>And going further with the sea-of-nodes representation just makes them all more powerful; I really do recommend reading Cliff Click's thesis.

We might have to agree to disagree on this one. I actually found sea of nodes to be a boneheaded idea. It makes one or two optimizations a little more elegant but everything else a huge pain in the ass. At least, that was my experience.



A huge benefit of the sea of nodes representation, at least how I envisioned it and we implemented in the early days of TurboFan, is that branch folding, load elimination, and all of the other forward dataflow analyses that do monotonic reductions can be combined into a single pass that operates on the IR in the optimal order and can iterate to a fix point efficiently.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: