Skip to content
Snippets Groups Projects
Commit 63c59f05 authored by Richard Sandiford's avatar Richard Sandiford
Browse files

ranger: Add shortcuts for single-successor blocks

When compiling an optabs.ii at -O2 with a release-checking build,
there were 6,643,575 calls to gimple_outgoing_range_stmt_p.  96.8% of
them were for blocks with a single successor, which never have a control
statement that generates new range info.  This patch therefore adds a
shortcut for that case.

This gives a ~1% compile-time improvement for the test.

I tried making the function inline (in the header) so that the
single_succ_p didn't need to be repeated, but it seemed to make things
slightly worse.

gcc/
	* gimple-range-edge.cc (gimple_outgoing_range::edge_range_p): Add
	a shortcut for blocks with single successors.
	* gimple-range-gori.cc (gori_map::calculate_gori): Likewise.
parent d27b7e69
No related branches found
No related tags found
Loading
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