[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Lightning] Lightning extensions

From: Paulo César Pereira de Andrade
Subject: Re: [Lightning] Lightning extensions
Date: Sun, 12 Sep 2010 12:03:17 -0300

Em 11 de setembro de 2010 09:39, Paolo Bonzini <address@hidden> escreveu:
> 2010/9/5 Paulo César Pereira de Andrade
> <address@hidden>:
>> o Some kind of peephole optimization. This is kind tough,
>>  and may become quite complex. Again, talking about
>>  x86*, it could convert some "ldr_x r0 r1; alur_x r0 r2 r0"
>>  into something more like "alum_x r0 r2 r1", where the
>>  "m" modifier stands for (m)emory. To have a simple
>>  peephole optimization it would require a different
>>  approach to handle labels and patches, and that could
>>  become very memory hungry, at it would most likely
>>  need to store operations in lists, up to jit_flush_code(),
>>  so, maybe the idea should be discarded by default...
> Yeah, this is a bit against the very idea of lightning and (before it) vcode.

  It probably should not be done in lightning itself, but offering some
way for external code to do register allocation is very desirable,
that is, instead of push/pop (or mov/xchg if it knows about a free
register, usually a destination one that is not suitable for the
operation), it would only do it if the register is known to not be
free at that moment.

> Everything else can be done.
> I'll try to review your patches soon!

  It should be very easy, like reviewing 10K lines of assembly code ;-)
Well, ok, a very tough job. Do you mind if I import the lightning test
tool I added to my project to my lightning tree in github? It should not
be installed, but building it should make testing very easier, as well as
writing small tests to check some construct.

> Paolo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]