Classification of Compilers
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Classification of Compilers

  • 1,390 views
Uploaded on

Classification of Compilers ...

Classification of Compilers

Single Pass Compilers
Two Pass Compilers
Multipass Compilers

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,390
On Slideshare
1,390
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
15
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • Code improvement - unclear slide

Transcript

  • 1. Lecture 2
  • 2. Classification of Compilers 1. Single Pass Compilers 2. Two Pass Compilers 3. Multipass Compilers
  • 3. Single Pass Compiler • Source code directly transforms into machine code. – For example Pascal source code target code Front EndCompiler
  • 4. Two Pass Compiler • Use intermediate representation – Why? source code target code Front End Back End IR Front End
  • 5. Two pass compiler • intermediate representation (IR) • front end maps legal code into IR • back end maps IR onto target machine • simplify retargeting • allows multiple front ends • multiple passes ⇒ better code 5
  • 6. © Oscar Nierstrasz Multipass compiler • analyzes and changes IR • goal is to reduce runtime • must preserve values 6
  • 7. Comparison • One pass compilers are generally faster than Multipass Compilers • Multipass ensures the correctness of small program rather than the correctness of a large program (high quality code)