Hi, there have been a bit of talk on improving loops with control flow, i.e. when there is no single dominant path through the loop. To have that discussion here let me make the following proposal (based on a proposal from Armin):
How about aiming for something that starts out with running the current JIT with the unrolling disabled. That will produce a graph of traces which we could partition into one subgraph per loop. When we believe all guards are either traced or never failing, we use such subgraphs as preambles. That is, we copy the full graph to producing a peeled loop graph and optimized it. We focus the optimization on removing the remaining guards as they (hopefully in most cases) are loop invariant. Then we have a guard free graph of traces that we could pass to gcc/llvm and the resulting machine code are attached after the preamble. If it turns out to be necessary, we could later add support for handing guards to better support cases where we are unable optimize them out. -- Håkan Ardö _______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
