G'day all.

On Tue, Apr 16, 2002 at 10:52:05PM +0200, Marco Baringer wrote:

> regarding (2): vector processors would certainly benefit from having
> loops (espicially the ones over arrays of similar things (a large
> percentage of real world loops)) explicitly labeled as such.

A few of comments:

        - Loops are very easy to detect.  Just as well, because loops
          don't necessarily come from loop syntax.

        - I don't know how easy it is to detect parallelisable loops
          (never worked with vector processors before), but I suspect
          that the hard part is not detecting the loops.

        - Unless the language has loops over numbers as a primitive
          operation, these ops are hard to generate code for in the
          general case.  This is not an argument against their
          existence, of course.  Not every compiler is going to
          generate code containing every op.  If there are measurable
          efficiency improvements in using them, it could well be
          worth going to the trouble to detect where they are useful.

> i'm sure
> the JIT compiler will be smart enough to figure this out by itself, by
> if i (or my compiler) know's its a loop why not mark it as such?

There are many things which the compiler knows which a JIT compiler
or optimiser might want to know about it (hell, I want live variable
information at the end of basic blocks), but I am inclined to think of
that sort of information as metadata rather than data.

Parrot bytecode will eventually need a flexible way to store compiler-
originated metadata.

Cheers,
Andrew Bromage

Reply via email to