- extra_fvs = foldr (unionVarSet . get_extras) emptyVarSet bindings
- get_extras (id, (rhs_fvs, rhs))
- | noFloatIntoRhs rhs = idRuleVars id `unionVarSet` rhs_fvs
- | otherwise = idRuleVars id
+ rule_fvs = foldr (unionVarSet . idRuleVars) emptyVarSet ids
+ extra_fvs = rule_fvs `unionVarSet`
+ unionVarSets [ fvs | (fvs, rhs) <- rhss
+ , noFloatIntoRhs rhs ]