invariant-loop-use? ( vreg loop selected -- ? )


Vocabulary
compiler.cfg.loop-optimization

Inputs
vregan object
loopan object
selectedan object


Outputs
?an object


Definition


:: invariant-loop-use? ( vreg loop selected -- ? )
vreg selected in?
[ t ] [
vreg def-of :> defining defining [
defining loop blocks>> in?
not defining loop header>> dominates? and
] [ f ] if
] if ;