On Fri, Oct 12, 2001 at 10:38:13AM -0500, William Harold Newman wrote:
> On Fri, Oct 12, 2001 at 10:21:25AM +0100, Christophe Rhodes wrote:
> > This all presupposes some way of convicing the compiler to emit these
> > nice vectorized VOPs for normal code. I've had several thoughts on the
> > issue, none of which are totally satisfactory, but I'm sure that we
> > can come up with something plausible to put in the sb-ext package...
> > I don't know if this is of any use to anyone, but I'm having fun.
> If you can make the compiler smart enough to do what high-performance
> compilers for other languages (especially Fortran) do, automatically
> compiling ordinary portable standard code into vector constructs when
> appropriate, that could be an impressive addition to the system. But
> for practical use it'd still have to compete with FFI bindings to the
> existing Fortran and C libraries for doing this kind of thing, so it's
> possible that I'd still consider its complexity-to-benefit ratio high
> enough that I'd reject it.
That's fair enough :)
> Probably it would depend on whether it
> seemed to make the architecture of the compiler cleaner, more
> flexible, and/or more expressive, or more kludgy, more twisted, and
> more baroque.
> If vectorization only happens when people use nonportable code or
> nonportable hints (e.g. the SB-EXT stuff you mentioned), then it seems
> more like an interesting experiment than something that many other
> programmers are likely to use, especially since it competes with FFI
> bindings to existing libraries. In this case, I'm likely not to put it
> into the main system, which'd probably be a cruel blow to software
> structured as compiler patches.
Well, there are actually two different things here. One is the patch
to the compiler (which I'm sure is not 100% correct at the moment) to
allow it to emit SSE instructions on x86. This I hope is relatively
uncontroversial as an aim -- even if nothing in the compiler itself
uses these more advanced instructions. This involves making a new
storage class, and so on and so forth, and defining the instructions.
The other half is the vectorizing stuff (the two files, rather than
the patch) which I agree is slightly more experimental. After thinking
about it some more, I have hopes that I will be able to vectorize at
least some simple portable code (map-into and variants) with simple
deftransforms, though how much is as yet unclear. However, I recognize
that it needs to be much more polished and carefully designed than it
is at present :)
Jesus College, Cambridge, CB5 8BL +44 1223 510 299
http://www-jcsu.jesus.cam.ac.uk/~csr21/ (defun pling-dollar
(str schar arg) (first (last +))) (make-dispatch-macro-character #\! t)
(set-dispatch-macro-character #\! #\$ #'pling-dollar)