Ok, so we split it up into a set of Optimization classes in separate
files. Each containing a subset of the optimize_... methods. Then we
have the propagate_forward method iterate over the instructions
passing them to one Optimization after the other? That way we keep the
single iteration over the instructions. Would it be preferable to
separate them even more and have each Optimization contain it's own
loop over the instructions?

On Sun, Aug 29, 2010 at 10:05 PM, Maciej Fijalkowski <[email protected]> wrote:
> On Sun, Aug 29, 2010 at 2:03 PM, Carl Friedrich Bolz <[email protected]> wrote:
>> On 08/29/2010 01:49 PM, Hakan Ardo wrote:
>>>> P.S.: A bit unrelated, but a comment on the jit-bounds branch: I think
>>>> it would be good if the bounds-related optimizations could move out of
>>>> optimizeopt.py to their own file, because otherwise optimizeopt.py is
>>>> getting really unwieldy. Does that make sense?
>>>
>>> Well, class IntBound and the propagate_bounds_ methods could probably
>>> be moved elsewhere, but a lot of the work is done in optimize_...
>>> methods, which I'm not so sure it would make sens to split up.
>>
>> I guess then the things that can be sanely moved should move. The file
>> is nearly 2000 lines, which is way too big. I guess also the heap
>> optimizations could go to their own file.
>>
>> Carl Friedrich
>
> How about a couple of files (preferably small) each containing a
> contained optimization if possible? (maybe a package?)
>



-- 
Håkan Ardö
_______________________________________________
[email protected]
http://codespeak.net/mailman/listinfo/pypy-dev

Reply via email to