From e2fe2fbed8fc261d1d4b77895cb945efc99bba5f Mon Sep 17 00:00:00 2001 From: Joe Savona Date: Wed, 8 Jan 2025 09:54:38 -0800 Subject: [PATCH] Update base for Update on "[compiler] ReactiveIR: add Let/Assign/Branch/Join nodes" Further exploration of the new ReactiveIR sea-of-nodes approach, adding Let/Assign/Branch/Join nodes. See the doc for more about how these work. Notable things in the implementation is that this ensures that reads and writes of variables are always ordered correctly: * Reads after writes: reads have a control dependency that ensures they come after the write they should be reading * Writes after reads: subsequent writes come after any reads of previous writes, or if no reads, after the previous write In both cases, the ordering only applies within consecutive control flow. The first read or write of a variable within a given branch of control flow will only take a dependency on the block's entry node (the default control). Not implemented yet is the logic to ensure that if there is a read within a branch, that we order the branch itself after the value that would be read (and similarly for writes), and also to construct phis for conditionally reassigned values and set the Join as the last write. [ghstack-poisoned]