Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #831

Re: Green Compiler ?

From glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups comp.compilers
Subject Re: Green Compiler ?
Date 2013-01-02 18:29 +0000
Organization Aioe.org NNTP Server
Message-ID <13-01-008@comp.compilers> (permalink)
References (3 earlier) <12-12-028@comp.compilers> <12-12-034@comp.compilers> <12-12-037@comp.compilers> <13-01-002@comp.compilers> <13-01-003@comp.compilers>

Show all headers | View raw


Jonathan Thornburg <jthorn@astro.indiana.edu> wrote:
> George Neuner <gneuner2@comcast.net> wrote:

(snip)
>> My opinions are colored by experience with DSPs, but I have long
>> thought that it would be helpful to have a few K-words of non-cache
>> scratchpad memory very close (1..2 cycles) to the CPU.

> The Cray-2 and Cray-3 had this (I think they called it "local memory").
> Alas, compilers had a lot of trouble making good use of it.  As John
> McCalpin put it in 1998 (at the time he was at SGI):

I previously suggested the Cray-1 vector registers, maybe not quite
the same. Still, the being able to move around multiple words in one
operation, especially to get them through a pipelined ALU, seems
a good one.

> # Local memories work fine if an experience performance person gets
> # to rewrite the code.  It gets a lot more difficult if you have
> # to educate a compiler to do the right thing....

I do remember, I believe from the Cray-1 days, suggestions of having
the linker allocate registers. That is, similar to the way memory
relocation is done at link time, vector registers would be assigned
to minimize (as well as can be done statically) register spill.

Now, that was before Fortran had dynamic allocation. (And Fortran
was the popular language for Cray programming.)

> I don't know if compilers have improved significantly in this area.

Compiler technology (and size) has change much over the years.

One ongoing question is how well compilers are doing with Fortran
array expressions. It would seem easier for compilers to generate
code using vector registers for array operations.

> And on the hardware side, you'd have to figure out what to do on
> context switch...

Seems to me that the idea behind batch programming (as contrasted
to time-sharing) is keeping context switch low. With a little luck
you don't have to save the vector registers (or local store) for
every interrupt.

(snip, our moderator wrote)
> [It sounds like if we keep working, we might reinvent register windows. -John]

Is SPARC dead now? I was never sure how well the SPARC register windows,
with in and out registers, actually worked for real code.
That is, if they made the best use of chip resources.

I presume they help more for procedure call register saving than for
contect switch, though.

-- glen
[SPARC is still around, mostly seems to be Sun selling servers to run parent
Oracle's software.  Register windows are awful for context switch, since you
have to dump and restore the whole register stack on each switch if you don't
have some hack like multiple stacks for active processes.  It is also my
impression that SPARC has register windows because it was designed to run code
from PCC, a compiler that did very naive register allocation.  The IBM 801
project was at the same time, and its chip had an ordinary register file because
they found that the compiler could generate code to do the saves and restores
at least as well as the implicit ones that windows do. -John]

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Green Compiler ? Abid <abidmuslim@gmail.com> - 2012-12-20 02:00 -0800
  Re: Green Compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-12-23 08:18 +0000
    Re: Green Compiler ? Peter Dassow <z80eu@arcor.de> - 2012-12-26 19:31 +0100
      Re: Green Compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-12-28 03:09 +0000
      Re: Green Compiler ? Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2012-12-28 08:35 +0100
        Re: Green Compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2012-12-28 16:14 +0000
        Re: Green Compiler ? Peter Dassow <z80eu@arcor.de> - 2012-12-29 09:35 +0100
          Re: Green Compiler ? Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2012-12-30 08:14 +0100
            Re: Green Compiler ? George Neuner <gneuner2@comcast.net> - 2012-12-31 01:24 -0500
              Re: Green Compiler ? "Jonathan Thornburg" <jthorn@astro.indiana.edu> - 2013-01-02 04:09 +0000
                Re: Green Compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2013-01-02 18:29 +0000
              Re: Green Compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2013-01-02 05:11 +0000
              Re: Green Compiler ? Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2013-01-02 07:29 +0100
                Re: Green Compiler ? glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2013-01-02 19:52 +0000
                Re: Green Compiler ? "Charles Richmond" <numerist@aquaporin4.com> - 2013-01-04 08:59 -0600
  Re: Green Compiler ? "Nils M Holm" <nmh@t3x.org> - 2012-12-23 10:01 +0100
    Re: Green Compiler ? Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2012-12-24 05:16 +0100
    Re: Green Compiler ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-12-27 13:36 +0000
      Re: Green Compiler ? "Nils M Holm" <nmh@t3x.org> - 2012-12-28 09:11 +0100
        Re: Green Compiler ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-12-28 16:57 +0000
        Re: Green Compiler ? George Neuner <gneuner2@comcast.net> - 2012-12-28 12:57 -0500
          Re: Green Compiler ? "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2012-12-30 09:22 +0100
    Re: Green Compiler ? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-12-27 21:59 -0600
  Re: Green Compiler ? Walter Banks <walter@bytecraft.com> - 2012-12-28 10:42 -0500

csiph-web