Skip to content
Snippets Groups Projects
Commit f9dfe8de authored by Richard Biener's avatar Richard Biener Committed by Richard Biener
Browse files

tree-optimization/114855 - high update_ssa time

Part of the problem in PR114855 is high update_ssa time.  When one fixes
the backward jump threading issue tree SSA incremental is at
439.91s ( 26%), mostly doing bitmap element searches for
blocks_with_phis_to_rewrite.  The following turns that bitmap to tree
view noticing the two-dimensional vector of PHIs it guards is excessive
compared to what we actually save with it - walking all PHI nodes
in a block, something we already do once to initialize stmt flags.
So instead of optimizing that walk we use the stmt flag, saving
allocations and global state that lives throughout the whole
compilation.

This reduces the tree SSA incremental time to 203.13 ( 14%)

The array was added in r0-74758-g2ce798794df8e1 when we still possibly
had gazillion virtual operands for PR26830, I checked the testcase
still behaves OK.

	PR tree-optimization/114855
	* tree-into-ssa.cc (phis_to_rewrite): Remove global var.
	(mark_phi_for_rewrite): Simplify.
	(rewrite_update_phi_arguments): Walk all PHIs, process
	those satisfying rewrite_uses_p.
	(delete_update_ssa): Simplify.
	(update_ssa): Likewise.  Switch blocks_with_phis_to_rewrite
	to tree view.
parent 824229e3
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment