This is the mail archive of the
mailing list for the GCC project.
Re: Fixes to ipa branch
Paulo wrote that he had another way of working around it:
> I was working around
> this by calling free_dominance_info before every pop_cfun."
Uhm, now that I really have the source under my eyes, what I was doing
was in fact just to drop the dominance info before every pop_cfun: look
at the bottom here.
@@ -2167,12 +2170,18 @@ push_cfun (struct function *new_cfun)
VEC_safe_push (function_p, heap, cfun_stack, cfun);
cfun = new_cfun;
+ if (!cfun->emit)
+ init_function_start (cfun->decl);
+ current_function_decl = cfun->decl;
+ free_dominance_info (CDI_DOMINATORS);
+ free_dominance_info (CDI_POST_DOMINATORS);
cfun = VEC_pop (function_p, cfun_stack);
+ current_function_decl = cfun ? cfun->decl : NULL;
Unfortunately, now I don't have the code triggering the bug at hand, but
I guess one pass was leaving dominator information allocated. You could
find it by turning the free_dominance_info calls into an assert, and I
probably would have done if my ipa-branch changes weren't just internal
development, not meant for FSF GCC.
Still, the rest of the patch, setting current_function_decl on
push_cfun/pop_cfun, is more interesting and it allows to dump a function
(for debugging purposes). Unless somebody beats me to it, I will
bootstrap and regtest it and submit it formally when I come back from