Preview

building a compiler

Satisfactory Essays
Open Document
Open Document
2613 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
building a compiler
Universität Dortmund

Building a compiler
(considering characteristics of embedded processors)

Peter Marwedel
University of Dortmund, Germany

 P. Marwedel, Univ. Dortmund/Informatik 12 + ICD/ES, 2006

Fri2 - 1 -

Universität Dortmund

Effort for building a compiler
 So far we assumed that all the optimizations can be added to some existing tool chain.
 Sometimes, a custom compiler is required, but: the effort for building a custom compiler is underestimated.
 It is not sufficient to design a processor and then think about the compiler later.
 Try to avoid the design of a full compiler. Approaches:
- Modify an existing compiler.
- Implement proposed optimizations as pre- or postpass optimization.
- Use existing standard software components
- Use retargetable compiler (see below)
 What if we have to look at the entire compiler ? 
 P. Marwedel, Univ. Dortmund/Informatik 12 + ICD/ES, 2006

Fri2 - 2 -

Universität Dortmund

Anatomy of a compiler
Compiler
C-source

frontend

HL-IR

HL2LL

LL-IR

backend

optimizations

ASM

assembler

OBJ

linker

EXE

Do not start from scratch!
 P. Marwedel, Univ. Dortmund/Informatik 12 + ICD/ES, 2006

Fri2 - 3 -

Universität Dortmund

Existing Compiler Frameworks: gcc
GNU Compiler Collection (GNU public license)
Family of C & C++ compilers
(also supports Java and Fortran)
Available for many different architectures
(e.g. Sparc, Mips, Alpha)
 Code-transformation into an IR (Intermediate
Representation) called RTL (Register Transfer
Language)
 Designed for homogeneous register machines
 No ideal fit for embedded processors based on slide by
(heterogeneous registers etc.)
Désirée Kraus, Inf 12, 2005
 P. Marwedel, Univ. Dortmund/Informatik 12 + ICD/ES, 2006

Fri2 - 4 -

Universität Dortmund

Existing Compiler Frameworks: lcc
Little C Compiler (Princeton University)
„lightweight compiler“ (~ 13.000 lines of code)
„A retargetable C

You May Also Find These Documents Helpful

  • Satisfactory Essays

    The second category of fault changes individual instructions in the text segment. These faults are intended to approximate the assembly-level manifestation of real C-level programming…

    • 285 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    En1320 Unit 1 Research Paper 1

    • 27742 Words
    • 111 Pages

    instructions to load the registers of the processor with data from a central memory and to…

    • 27742 Words
    • 111 Pages
    Powerful Essays
  • Powerful Essays

    Pt1420 Unit 1 Assignment 2

    • 1305 Words
    • 6 Pages

    Das, D., Gregersen, E., Hosch, L., Lotha, G., Sampaolo, M., Sinha, S. (2014). C++. In Encyclopedia Britannica.…

    • 1305 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    pt1420 exam review

    • 738 Words
    • 3 Pages

    What is used to translate high level language programs to machine language (or machine code)? Compiler…

    • 738 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    a.x is available to code that is written outside the Sphere class. b.radius is not available to code written outside the Sphere class. c.radius, x, y, and z are called members of the Sphere class. d.z is available to code that is written outside the Sphere class.…

    • 1368 Words
    • 9 Pages
    Satisfactory Essays
  • Satisfactory Essays

    This article focuses a lot on the output of the rewriting activity, inspecting the rewritten HPC programs and causes of source-code bloat. “A key metric was the number of SLOC (source lines of code).” The use of source code, uncovers various indications that the rewritten programs had fewer lines of code, and also that they were easier to read, verify, and modify. The new code is clear, concise, and easy to read. Readability and maintainability of the source code benefited greatly from condensing these transformations into a few functions, but the performance suffered from the extra procedure calls and loss of many specializations and optimizations of the transformations. The battle to deliver good performance on expressive HPC source code must still…

    • 630 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Prg420 Syllabus

    • 1691 Words
    • 7 Pages

    Yelick, K., Hilfinger, P., Graham, S., Bonachea, D., Su, J., Kamil, A., et al. (2007, fall). Parallel languages and compilers: Perspective from the Titanium experience. International Journal of High Performance Computing Applications, 21(3), 266.…

    • 1691 Words
    • 7 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Chapter 2: Data Manipulation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear Copyright © 2012 Pearson Education, Inc. Chapter 2: Data Manipulation • • • • • • 2.1 Computer Architecture 2.2 Machine Language 2.3 Program Execution 2.4 Arithmetic/Logic Instructions 2.5 Communicating with Other Devices 2.6 Other Architectures Copyright © 2012 Pearson Education, Inc. 0-2 1 Computer Architecture • Central Processing Unit (CPU) or processor – Arithmetic/Logic unit versus Control unit – Registers • General purpose • Special purpose • B Bus • Motherboard Copyright © 2012 Pearson Education, Inc. 0-3 Figure 2.1 CPU and main memory connected via a bus…

    • 783 Words
    • 4 Pages
    Satisfactory Essays
  • Powerful Essays

    How to Compile Your...

    • 2560 Words
    • 11 Pages

     A way for you to show the National CDA Council who you are and…

    • 2560 Words
    • 11 Pages
    Powerful Essays
  • Better Essays

    How to Build a Computer

    • 1139 Words
    • 5 Pages

    Most people believe that building a desktop computer is difficult or complicated, even though that is not really the case. It takes a basic understanding of how to use a screw driver, read manuals, and know a little about basic hardware and software. Building your own computer has its ups and downs. Building a computer one’s self can save money, because then you do not have to pay someone else to do it. Also, when building the computer, you need one hundred percent control over what is inside the computer hardware and software-wise. While building a Personal Computer (PC) is somewhat easy, building a MAC is not because Apple usually controls parts and software too much.…

    • 1139 Words
    • 5 Pages
    Better Essays
  • Good Essays

    How to build a computer

    • 943 Words
    • 4 Pages

    Building a computer from scratch is very complex, but also interesting. It gives you the ability to customize and personalize it to make it one’s own. In this “How To” instructional, I will be showing taking you through various steps needed in order to make this happen. This instructional will help you in designing a system targeted toward your own use.…

    • 943 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    IEEE—ICET 2006 2nd International Conference on Emerging Technologies Peshawar, Pakistan 13-14 November 2006 1-4244-0502-5/06/$20.00 ©2006 IEEE 689 Preventing Reverse Engineering Threat in Java Using Byte Code Obfuscation Techniques Jan M. Memon, Shams-ul-Arfeen, Asghar Mughal, Faisal Memon Department of Computer Science Isra University, Hyderabad, Pakistan {janmohd, shams, asghar, faisal}@isra.edu.pk Abstrac: Java programs are compiled into a platform independent byte code format. Much of the information contained in the source code is retained in the byte code.…

    • 3123 Words
    • 13 Pages
    Powerful Essays
  • Powerful Essays

    Na steku stvarnih parametara je potrebno cuvati i povratnu liniju odakle treba nastaviti citanje ulaza po zavrsetku ekspanzije ugnezdenog poziva (nije precizirano u algoritmu).…

    • 2164 Words
    • 9 Pages
    Powerful Essays
  • Satisfactory Essays

    Programming Mini Project

    • 1010 Words
    • 5 Pages

    SOFTWare design FLOWCHART Start define SIZE 52 int getInput1(void); int getBalance(void); int dispData(void); int countAge(void); void getName(char first_name[10]); void getName2(char last_name[10]); int main(void) Declare num,ic, first_name[10],last_name[10], soal,i Print WELCOME TO Intelligence Tech ptd.ltd Main Menu:-) This smart card reader provides you some applications.…

    • 1010 Words
    • 5 Pages
    Satisfactory Essays
  • Better Essays

    How to Build a P.C

    • 4380 Words
    • 18 Pages

    Building your first p.c. is an arduous and daunting task to say the least, it can be extremely time consuming to finalise ones final specifications and to actually assemble the various components. But the joy of knowing that you have custom tailored and built this computer to your exact specifications brings a great feeling of accomplishment (also the incredible monetary savings also help), I personally believe everyone should build a p.c at least once in their life due to the fact that doing so helps one learn a lot about the various inner workings of a computer, and the incredible price of a custom built p.c. is also quite a large incentive. This step by step guide will give you the mental tools and knowledge of building a p.c. for those who have never built a computer before and I shall show examples of a build.…

    • 4380 Words
    • 18 Pages
    Better Essays