* tree-cfg.c (tree_forwarder_block_p): Speed up by walking
through the statements backward.
From-SVN: r93768
* 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:
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);