LectureNotesPartFour

LectureNotesPartFour - LECTURE NOTES Section Four...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
LECTURE NOTES Section Four Interaction of Computer Architecture and Compilers The task of a compiler is to transform a program written in some high-level machine independent language into an efficient, functionally equivalent representation of the target machine’s instruction set. Thus there is a very strong relationship between the external architecture of a machine and the design of a compiler to generate code for that machine. The external architecture can seriously impact the efficiency of the compiler…as we shall see. Most of you have heard of RISC computers…what are they and, more importantly, why are they? RISC…Reduced Instruction Set Computers. We will discuss these in depth later, for now……studies have shown that over the years, external architectures have evolved toward ever greater complexity Larger, more complex instruction sets, for example. Very few people program in assembly language now because of the widespread use and acceptance of high level languages. It therefore falls to compiler writers to fully utilize these complex instruction sets. There are now many ways to implement, for example, a loop structure in today’s instruction sets. Which one should the compiler choose to be the most efficient? This determination is so complex, that compilers often ignore these more powerful instructions. The result is that only a small subset of the instruction set is actually used by most compilers. Studies by Alexander and Wortman in 1975 found that only 10 instructions accounted for 80% of instructions executed and 99% of instructions executed were accounted for by 30 instructions. In the meantime, the architecture of computers was becoming more and more complex, increasing design time and errors in design, thereby increasing cost and degrading performance to some degree. Thus the proponents of the RISC philosophy suggest that instead of implementing large complex instruction sets which are going to be ignored anyway by the compilers, why not select a small or reduced set which can be efficiently exploited by these compilers. The Berkely RISC has 31 instructions. From a compiler writer’s point of view: what features constitute an ideal architecture? Regularity. If a particular feature is realized in a certain way in one part of the architecture, it should be realized the same way in all parts. For example….general purpose registers…should be useable in a general uniform way by all instructions, there should be no instructions that can access only certain registers. Orthogonality
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/10/2012 for the course CSC 520 taught by Professor Simmons during the Fall '07 term at S. Alabama.

Page1 / 5

LectureNotesPartFour - LECTURE NOTES Section Four...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online