On May 12, 2016 6:02:47 PM GMT+02:00, Marc Glisse <marc.gli...@inria.fr> wrote: >On Thu, 12 May 2016, Richard Biener wrote: > >> Yeah - note that VRP already calls set_range_info before simplifying >> stmts. It's just that substitute_and_fold doesn't apply fold_stmt >(and >> thus match.pd) to all stmts but it only applies the pass specific >"fold" >> (vrp_fold_stmt) to all stmts. > >Just to be sure: is the fact that VRP doesn't apply fold_stmt on >purpose?
The propagator only folds stmts that had operands replaced (that doesn't enable all simplifications as match.PD patterns cover more than one statement). >The restriction makes sense, it is just that it may yield a bit of >duplication. We already indirectly use get_range_info in match.pd and >may >miss out on opportunities that only occur in branches during the VRP >pass. Yes. The pass specific fold is called on each stmt. Maybe we can omit the propagators folding if the pass specific folding applied. Richard.