Specifically, the following idiom broke our CFGSimplifier:
b1:
branch_if %cond, %b2, %b3
b2:
branch %b3
b3:
%v = phi [ %b2 => 0, %b3 => 1 ]
This is very annoying to properly handle in general case, and also
this (specifically %b2) is exactly what broke LocalAccessValidator
in the first place. So, remove CFGSimplifier altogether.
Instead, teach LocalAccessValidator how to look through predecessors
in order to get a location.
As a result, the dominator tree can now process arbitrary (reducible)
CFGs and we do not run DCE before analyses, risking loss of
correspondence to the AST, which would arbitrarily silence analyses.
Unification-based inference for regions is useful with a language
that has let bindings (which would propagate the regions) and
functions polymorphic over regions. For reasons of simplicity,
ARTIQ has neither, and making unification-based inference work would
essentially mean adding region coercions between most AST nodes,
and having every source subexpression have its own region variable,
with the appropriate subtyping relationship.
It's simpler to just keep that state outside of typedtree.