On Tue, 23 Nov 2004 23:26:39 +0100, Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Matt Fowles wrote: > > > Have we seen that this actually destroys us? Meaning, if we add the > > extra CFG arcs, do we start spilling like mad? If not, this is much > > ado about nothing. > > Please first have a look at Dan's recent posting about Evil Sub. Then > estimate, how many subs may be called in 14000 basic blocks. For 100 > subs only you get ~10000 more edges ... > > Second, having this arcs means just that in that range i.e. from the > first subroutine to the last, you can't reuse a register around a call. > Question: how many from ~23000 registers might be effected. Please note > the currently rather low spill count despite the huge register usage.
Keep in mind that you don't actually have to add all those CFG edges. You already know precisely the effects of adding them. All non-volatile symbols (those crossing subs that might make continuation invocations) are garanteed to interfere. This is garanteed to be a clique in the interference graph. No need to actually add the CFG edges to know how the interference graph is effected. This brings up the possibility of non-volatile symbols that cross subs that are garanteed *not* to invoke continuations. Those would not necessarily be part of the clique, but would be non-volatile (forced into the upper half of registers). The register allocator could handle that the way it currently does (the one I'm currently working on, that is). It bothers me that this discussion is not including the concept of subs that don't call/invoke continuations. Remember the previous posts about adding a label, or setting a pragma? Also, if that sub is defined in the same imc source code, we can analyze it to see if there is a continuation there or not. Another interesting thing about this problem is that these new CFG edges are rarely, or at least with low probability, ever travelled. That can also be used to our advantage I think. ~Bill