Put virtual operands into loop-closed SSA

When attempting to manually update SSA form after high-level loop
transforms such as loop versioning it is helpful when the loop-closed
SSA form includes virtual operands.  While we have the special
rewrite_virtuals_into_loop_closed_ssa function that doesn't
presently scale, invoking update_ssa by itself.  So the following
makes the regular loop-closed SSA form also cover virtual operands.
For users of loop_version this allows to use cheaper
TODO_update_ssa_no_phi, skipping dominance frontier compute
(for the whole function) and iterated dominance frontiers for each
copied def.

	* tree-ssa-loop-manip.h
	(rewrite_virtuals_into_loop_closed_ssa): Remove.
	(rewrite_into_loop_closed_ssa_1): Likewise.
	* tree-ssa-loop-manip.cc (rewrite_into_loop_closed_ssa_1):
	Make static.
	(rewrite_into_loop_closed_ssa): Remove loop overload,
	always rewrite virtuals into LC SSA.
	(check_loop_closed_ssa_bb): Also check virtuals.
	* tree-ssa-dce.cc (remove_dead_phis): Preserve virtual
	LC PHIs when in LC SSA.
	* gimple-loop-jam.cc (fuse_loops): Do not rewrite into
	loop-closed SSA here, but ...
	(tree_loop_unroll_and_jam): ... here once.
	* tree-if-conv.cc (version_loop_for_if_conversion): Use
	the cheaper TODO_update_ssa_no_phi.
	* tree-loop-distribution.cc (version_loop_by_alias_check):
	Likewise.
	* tree-ssa-loop-unswitch.cc (tree_unswitch_single_loop):
	Likewise.
	* tree-vect-loop-manip.cc (vect_loop_versioning): Likewise.
	(tree_unswitch_outer_loop): Do not rewrite virtuals into
	LC ssa.
	* tree-parloops.cc (transform_to_exit_first_loop_alt):
	Likewise.
	(pass_parallelize_loops::execute): After finishing rewrite
	into LC SSA again because we do not maintain it properly.
9 files changed