Code folding from JSR/RTS -> {Local} (Gregory Carter)
Wed, 1 May 91 03:56:22 GMT

          From comp.compilers

Related articles
Code folding from JSR/RTS -> {Local} (1991-05-01)
Re: Code folding from JSR/RTS -> {Local} (1991-05-02)
Re: Code folding from JSR/RTS -> {Local} (1991-05-02)
Re: Code folding from JSR/RTS -> {Local} (1991-05-03)
Re: Code folding from JSR/RTS -> {Local} (1991-05-13)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Gregory Carter)
Summary: Speed and redundancy in fault tolerant Compiler Systems
Keywords: optimize, architecture
Organization: U of Wisconsin CS Dept
References: <> <>
Date: Wed, 1 May 91 03:56:22 GMT


I don't know if this is incredibly obvious or what, but in the OLDEN DAYS
when I was working on a 6502 machine. Speed was of the nauseum..

What I want to know, if any of you have considered, for high speed applications
to get that extra push, what the problems would be in compiler design to:

1) Transcribe all local variables to global ones.
2) Replacing subroutine calls with the actual code.
3) minimizing stack frame usage to almost ZIPPO.

I have done this so often by hand, I wish I could tell my compiler to do it!

For example: nauseum



-> My mythical switch -L (Local data and code segments -> global state)
      results in the above being transcribed to:


No stack frames, no parameters, no slow stack model, DUMP THOSE
JSR's/RTS's link/unlnk instructions! GIVE ME JMP PERIOD. Since the
compiler handles the transcription, Hey! We can still have readable
modular ad nauseum type code on the C source level.

Of course, this is REDUNDANT, in that code is replicated all over the
place. Millions of machine cycles can be saved, though...depending on
your computer. I think this method will be more and more attractive as
memory prices go through the floor.

I don't see why just because us humans have to think about inefficient
stack models, why must the computer be made to do it this way when we
don't need it too?

Problem is, will the transcription of the code generation part of the
compiler be able to do this when you want to shift from a stack based
paradigm to a non stack based paradigm.

--Gregory (Undergrad for life)
[GCC and some other C compilers permit you do declare a procedure "inline"
so that it is expanded wherever it is called. That gives pretty much the
same effect, faster but larger code. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.