https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71148
--- Comment #4 from Ilya Enkovich <ienkovich at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> thus cleanup_cfg updating dominance info. Note the et_splay operation itself
> is this slow (another reason for this may be a corrupt et forest after the
> recent x86 backend "issues" with dominance info).
So cleanup_cfg shouldn't be called with invalidated dominance info. Therefore
we need two checks for invalidated dominance info. One before cleanup_cfg and
onr after, right? This patch fixes testcase compilation:
@@ -7630,6 +7636,12 @@ rest_of_handle_cse2 (void)
delete_trivially_dead_insns (get_insns (), max_reg_num ());
+ /* Check if we need to free dominance info before cleanup_cfg
+ because it may become really slow in case of invalid
+ dominance info. */
+ if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS))
+ free_dominance_info (CDI_DOMINATORS);
+
if (tem == 2)
{
timevar_push (TV_JUMP);
I wonder why we try to update dominance info in cleanup_cfg if as PR71084 shows
it still may invalidate it.