Re: Compiler complexity (was: VAX Always Uses Fewer Instructions) (Peter Damron)
17 Jun 88 23:03:07 GMT

          From comp.compilers

Related articles
Re: Compiler complexity (was: VAX Always Uses Fewer Instructions) (1988-06-17)
Re: Compiler complexity (was: VAX Always Uses Fewer Instructions) samples@dougfir.Berkeley.EDU (1988-06-20)
Re: Compiler complexity (was: VAX Always Uses Fewer Instructions) (1988-06-21)
| List of all articles for this month |

From: (Peter Damron)
Newsgroups: comp.arch,comp.compilers
Summary: current retargetable compilers
Keywords: RISC CISC
Date: 17 Jun 88 23:03:07 GMT
References: <6921@cit-vax.Caltech.Edu> <28200161@urbsdc> <10595@sol.ARPA> <>
Organization: U of Washington, Computer Science, Seattle

In article <>, (Jim Giles) writes:
> This discussion brings up a question about the actual use of CISC
> instructions. It seems that RISC vs. CISC is probably about a draw
> for raw compute speed of special coded sequences. The question is:
> how many programs actually get full advantage from the large instruction
> sets offered by CISC?
> In more recent years, has the state of the compiler art improved so that
> good code generators for CISC machines can be built easily? Or is it
> still a hit or miss operation? Do modern compilers for CISC make good
> use of the variety in the instruction set?
> J. Giles
> Los Alamos

The current state of the art in retargetable code generators is such
that the addressing modes of CISC machines can be easily handled
(with the possible exeption of addressing mode with side-effects).
Complex instructions like the VAX polynomial instruction and string
move instructions are still problematic.

These code generators are based on machine descriptions written
as regular tree grammars and on tree parsing techniques.

I have been working on techniques for handling complex instructions
in a retargetable code generator, but it is a hard problem.

Further problems include the integration of register allocation,
instruction selection, and instruction scheduling.

Any further discussion along these lines should probably be moved
to comp.compilers.

Peter Damron
Department of Computer Science
University of Washington
[My impression is that taking advantage of complicated instructions often
adds ugly irregularities to an otherwise clean register model. For example,
the IBM 370's BXLE and BXH instructions do just the right thing for a
count-by-N loop, but only if the operands are in adjacent registers. Ditto
the Vax string move instructions. A separate problem is that in many cases
(again Vax MOVC5 is an example) the instructions do something so complicated
that in a low-level language like C or Fortran you'd have to write a fairly
large chunk of code that the code generator would have to recognize as
sufficiently close to the instruction. As the RISC crowd points out, these
complicated instructions often end up being slower than the equivalent
operation synthesized out of simpler ops, particularly if some compile-time
optimization is possible, so the only gain is in instruction density. -John]

Post a followup to this message

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