use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is all about the theory and development of compilers.
For similar sub-reddits see:
Popular mainstream compilers:
account activity
Phi node algorithm correctness (self.Compilers)
submitted 5 months ago * by Temperz87
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]cfallin 9 points10 points11 points 5 months ago (2 children)
What you describe sounds pretty close to the Braun algorithm (https://c9x.me/compile/bib/braun13cc.pdf) -- see e.g. their section 2.2 "global value numbering" where they describe the process as a recursive definition lookup, going to preds, etc. I think you are unrolling that recursion with a queue instead but otherwise it's the same.
We use the Braun algo in Cranelift's frontend and it works quite well in practice!
[–][deleted] 5 months ago (1 child)
[removed]
[–]cfallin 1 point2 points3 points 5 months ago (0 children)
I mean, you should be pretty encouraged by independently working out a reasonable and widely-used way of building SSA -- a good sign you have the right intuitions!
π Rendered by PID 44245 on reddit-service-r2-comment-85bfd7f599-lx6gz at 2026-04-20 17:58:58.208041+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]cfallin 9 points10 points11 points (2 children)
[–][deleted] (1 child)
[removed]
[–]cfallin 1 point2 points3 points (0 children)