}
/* The main entry point into this module. DIR is set depending on whether
- we want to compute dominators or postdominators. */
+ we want to compute dominators or postdominators. If COMPUTE_FAST_QUERY
+ is false then the DFS numbers allowing for a O(1) dominance query
+ are not computed. */
void
-calculate_dominance_info (cdi_direction dir)
+calculate_dominance_info (cdi_direction dir, bool compute_fast_query)
{
unsigned int dir_index = dom_convert_dir_to_idx (dir);
else
checking_verify_dominators (dir);
- compute_dom_fast_query (dir);
+ if (compute_fast_query)
+ compute_dom_fast_query (dir);
timevar_pop (TV_DOMINANCE);
}
DOM_OK /* Everything is ok. */
};
-extern void calculate_dominance_info (enum cdi_direction);
+extern void calculate_dominance_info (enum cdi_direction, bool = true);
extern void calculate_dominance_info_for_region (enum cdi_direction,
vec<basic_block>);
extern void free_dominance_info (function *, enum cdi_direction);
timevar_push (TV_TREE_CLEANUP_CFG);
}
- /* Compute dominator info which we need for the iterative process below. */
+ /* Compute dominator info which we need for the iterative process below.
+ Avoid computing the fast query DFS numbers since any block merging
+ done will invalidate them anyway. */
if (!dom_info_available_p (CDI_DOMINATORS))
- calculate_dominance_info (CDI_DOMINATORS);
+ calculate_dominance_info (CDI_DOMINATORS, false);
else
checking_verify_dominators (CDI_DOMINATORS);