Might want to keep track of constant bounds during codegen
#7805 adds support for using constant bounds inference to perform instruction selection on x86, HVX, and WASM. It works for small tests, but might be more powerful if we track a scope of constant bounds while traversing the Expr AST for codegen. This is just a tracking issue for that TODO.
Yeah, it'd be updated in the Let/LetStmt visitor in the base class I think.
Yeah, the main reason I don't just add it to #7805 is that I suspect it would be best to only track "useful" expression bounds (especially because bounds are currently useless for anything other than saturating narrow instructions), and it feels a waste to keep a scope around + compute constant bounds for every single expression during codegen.
Will be fixed in #8155 , which makes cheap constant bounds available in codegen and uses it for a handful of things. Still no tracking through let / letstmts though (it should probably be done lazily)