Commit f8ef82ea by Kazu Hirata Committed by Kazu Hirata

tree-cfg.c (tree_forwarder_block_p): Speed up by walking through the statements backward.

	* tree-cfg.c (tree_forwarder_block_p): Speed up by walking
	through the statements backward.

From-SVN: r93768
parent 26e75214
......@@ -2,6 +2,9 @@
* tree-cfg.c (tree_can_merge_blocks_p): Reorder two checks.
* tree-cfg.c (tree_forwarder_block_p): Speed up by walking
through the statements backward.
2005-01-17 Ian Lance Taylor <ian@airs.com>
PR middle-end/13127:
......
......@@ -3911,9 +3911,9 @@ tree_forwarder_block_p (basic_block bb)
gcc_assert (bb != ENTRY_BLOCK_PTR);
#endif
/* Now walk through the statements. We can ignore labels, anything else
means this is not a forwarder block. */
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
/* Now walk through the statements backward. We can ignore labels,
anything else means this is not a forwarder block. */
for (bsi = bsi_last (bb); !bsi_end_p (bsi); bsi_next (&bsi))
{
tree stmt = bsi_stmt (bsi);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment