bloqade.stim.passes.hint_const_in_loops
hint_const_in_loops¶
bloqade.stim.passes.hint_const_in_loops
Set const hints on statements inside preserved scf.For bodies.
The standard kirin pipeline runs const.Propagate once at the top-level
method scope, so SSA values inside preserved scf.For bodies don’t pick up
const hints. This module fills that gap with a generic rule that mimics
const.Propagate’s pure-fallback logic (run each Pure statement’s
concrete impl on its const-hinted args, stamp the result back as a const
hint), plus a few specialized rules for cases that need static-type info
or scf.For-aware traversal.
View bloqade.stim.passes.hint_const_in_loops.HintPureFromConcrete →View bloqade.stim.passes.hint_const_in_loops.HintPureFromConcrete.dialects →View bloqade.stim.passes.hint_const_in_loops.HintPureFromConcrete.rewrite_Statement →View bloqade.stim.passes.hint_const_in_loops.HintLen →View bloqade.stim.passes.hint_const_in_loops.HintLen.rewrite_Statement →View bloqade.stim.passes.hint_const_in_loops.PropagateInitializerHints →View bloqade.stim.passes.hint_const_in_loops.PropagateInitializerHints.rewrite_Statement →View bloqade.stim.passes.hint_const_in_loops.PropagateBodyArgTypes →View bloqade.stim.passes.hint_const_in_loops.PropagateBodyArgTypes.rewrite_Statement →View bloqade.stim.passes.hint_const_in_loops.HintConstInLoops →View bloqade.stim.passes.hint_const_in_loops.HintConstInLoops.unsafe_run →