Daniel Berlin wrote:
We already update life info way too much, even without struct-equiv (Before struct equiv, this was done because flow's dce relied on register liveness, and we called it from everywhere under the sun, usually deep within other functions nobody realized were doing it). I can tell you that *without* struct equiv, we update liveness at least 19 or 20 times per compile, on average. Some are much much higher, because each cleanup_cfg iteration causes a life update. This is a true time sink in the compiler.
Let me ask a really stupid question. Where are we supposed to be clearing BB_DIRTY flags?
I instrumented the old version of the struct-equiv patches to give me some information about the basic blocks it's being called for, and noticed that blocks always remain dirty, even though we're calling update_life_info_in_dirty_blocks. A quick grep showed no place in the compiler where the flag is cleared. Under these circumstances, it's no surprise that we keep doing global liveness updates during crossjumping.
Sadly, a simple patch to clear the flag in update_life_info just failed to bootstrap with an internal compiler error.
Jan... the ChangeLogs suggest that you came up with BB_DIRTY. How is this intended to work?
Bernd