←back to thread

170 points signa11 | 1 comments | | HN request time: 0.203s | source
Show context
mananaysiempre ◴[] No.41086240[source]
> Bril’s SSA form needs a full rework, probably including an actual language extension along the lines of MLIR’s basic block arguments.

The linked MLIR documentation, in turn, credits Swift for that idea, but the earliest occurrence of phis as continuation arguments I know is in MLton. It’d be interesting to know where this idea comes from initially, because standard phis really are incredibly awkward.

replies(2): >>41088787 #>>41089366 #
thechao ◴[] No.41088787[source]
I really like this idea — I use it in a couple of you languages I maintain for work — but have never seen a good write up for the idea. Do you have any pointers to papers?
replies(1): >>41092646 #
1. JonChesterfield ◴[] No.41092646[source]
Basic block arguments are a good thing. Cranelift wrote some stuff on this and mlton is well documented. Huge semantic simplification in my opinion - the simultaneous evaluation hassle of phi nodes disappears, leaving behind needing to deal with calling conventions across jumps. Which are a hassle, but it's the same thing as a function call, and you've probably got those anyway.