[pypy-dev] jit-bounds branch (was: Loop invaraints)

Hakan Ardo hakan at debian.org
Thu Sep 2 07:32:54 CEST 2010


Hi,
I've checked in a version of optimizeopt that is a package with
support for building a chain of optimizations and passing instructions
down this chain. Does this design make sens? If so I'll start moving
the different optimization to the different files. It will require
some refactoring, but not too much I hope...

On Tue, Aug 31, 2010 at 9:25 AM, Hakan Ardo <hakan at debian.org> wrote:
> 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 <fijall at gmail.com> wrote:
>> On Sun, Aug 29, 2010 at 2:03 PM, Carl Friedrich Bolz <cfbolz at gmx.de> 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ö
>



-- 
Håkan Ardö



More information about the Pypy-dev mailing list