SlideShare uma empresa Scribd logo
1 de 7
Lecture 2
Classification of Compilers
1. Single Pass Compilers
2. Two Pass Compilers
3. Multipass Compilers
Single Pass Compiler
• Source code directly transforms into
machine code.
– For example Pascal
source
code
target
code
Front EndCompiler
Two Pass Compiler
• Use intermediate representation
– Why?
source
code
target
code
Front End Back End
IR
Front End
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
© Oscar Nierstrasz
Multipass compiler
• analyzes and changes IR
• goal is to reduce runtime
• must preserve values
6
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)

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Compiler design
Compiler designCompiler design
Compiler design
 
Language translator
Language translatorLanguage translator
Language translator
 
Assembly Language
Assembly LanguageAssembly Language
Assembly Language
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
Compilers
CompilersCompilers
Compilers
 
Ch 4 linker loader
Ch 4 linker loaderCh 4 linker loader
Ch 4 linker loader
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 
Issues in the design of Code Generator
Issues in the design of Code GeneratorIssues in the design of Code Generator
Issues in the design of Code Generator
 
Macro Processor
Macro ProcessorMacro Processor
Macro Processor
 
Interpreter
InterpreterInterpreter
Interpreter
 
Language processing activity
Language processing activityLanguage processing activity
Language processing activity
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
phases of a compiler
 phases of a compiler phases of a compiler
phases of a compiler
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
Compiler construction tools
Compiler construction toolsCompiler construction tools
Compiler construction tools
 
Compiler Construction Course - Introduction
Compiler Construction Course - IntroductionCompiler Construction Course - Introduction
Compiler Construction Course - Introduction
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
1.Role lexical Analyzer
1.Role lexical Analyzer1.Role lexical Analyzer
1.Role lexical Analyzer
 

Destaque

Different phases of a compiler
Different phases of a compilerDifferent phases of a compiler
Different phases of a compiler
Sumit Sinha
 
Introduction to compiler
Introduction to compilerIntroduction to compiler
Introduction to compiler
Abha Damani
 
Source-to-Source Compiler
Source-to-Source CompilerSource-to-Source Compiler
Source-to-Source Compiler
Mintoo Jakhmola
 
System Programming Unit III
System Programming Unit IIISystem Programming Unit III
System Programming Unit III
Manoj Patil
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
Manoj Patil
 

Destaque (20)

Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 
Passescd
PassescdPassescd
Passescd
 
what is compiler and five phases of compiler
what is compiler and five phases of compilerwhat is compiler and five phases of compiler
what is compiler and five phases of compiler
 
Lexical analyzer
Lexical analyzerLexical analyzer
Lexical analyzer
 
What is Compiler?
What is Compiler?What is Compiler?
What is Compiler?
 
Different phases of a compiler
Different phases of a compilerDifferent phases of a compiler
Different phases of a compiler
 
Introduction to Functional Languages
Introduction to Functional LanguagesIntroduction to Functional Languages
Introduction to Functional Languages
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Yacc
YaccYacc
Yacc
 
Ch2
Ch2Ch2
Ch2
 
Compiler unit 1
Compiler unit 1Compiler unit 1
Compiler unit 1
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Introduction to compiler
Introduction to compilerIntroduction to compiler
Introduction to compiler
 
Source-to-Source Compiler
Source-to-Source CompilerSource-to-Source Compiler
Source-to-Source Compiler
 
Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)Compiler Design(NANTHU NOTES)
Compiler Design(NANTHU NOTES)
 
System Programming Unit III
System Programming Unit IIISystem Programming Unit III
System Programming Unit III
 
Macro
MacroMacro
Macro
 
Phases of the Compiler - Systems Programming
Phases of the Compiler - Systems ProgrammingPhases of the Compiler - Systems Programming
Phases of the Compiler - Systems Programming
 
Software Evolution
Software EvolutionSoftware Evolution
Software Evolution
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 

Semelhante a Classification of Compilers

Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
RAJU KATHI
 

Semelhante a Classification of Compilers (20)

Passes of Compiler.pptx
Passes of Compiler.pptxPasses of Compiler.pptx
Passes of Compiler.pptx
 
Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introduction
 
CD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptxCD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptx
 
Compiler type
Compiler typeCompiler type
Compiler type
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptx
 
Compiler Design Introduction
Compiler Design Introduction Compiler Design Introduction
Compiler Design Introduction
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Chap01-Intro.ppt
Chap01-Intro.pptChap01-Intro.ppt
Chap01-Intro.ppt
 
Pros and cons of c as a compiler language
  Pros and cons of c as a compiler language  Pros and cons of c as a compiler language
Pros and cons of c as a compiler language
 
Trans coder
Trans coderTrans coder
Trans coder
 
Compiler Design Introduction
Compiler Design IntroductionCompiler Design Introduction
Compiler Design Introduction
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
Concept of compiler in details
Concept of compiler in detailsConcept of compiler in details
Concept of compiler in details
 
JIT Compiler
JIT CompilerJIT Compiler
JIT Compiler
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
 
Cpcs302 1
Cpcs302  1Cpcs302  1
Cpcs302 1
 
aditya malkani compiler.pptx
aditya malkani compiler.pptxaditya malkani compiler.pptx
aditya malkani compiler.pptx
 

Mais de Sarmad Ali (12)

Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers Network Engineer Interview Questions with Answers
Network Engineer Interview Questions with Answers
 
RDBMS Model
RDBMS ModelRDBMS Model
RDBMS Model
 
RDBMS Algebra
RDBMS AlgebraRDBMS Algebra
RDBMS Algebra
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
RDBMS ER2 Relational
RDBMS ER2 RelationalRDBMS ER2 Relational
RDBMS ER2 Relational
 
RDBMS Arch & Models
RDBMS Arch & ModelsRDBMS Arch & Models
RDBMS Arch & Models
 
RDBMS ERD Examples
RDBMS ERD ExamplesRDBMS ERD Examples
RDBMS ERD Examples
 
Management Information System-MIS
Management Information System-MISManagement Information System-MIS
Management Information System-MIS
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Introduction to RDBMS
Introduction to RDBMSIntroduction to RDBMS
Introduction to RDBMS
 
About Data Base
About Data BaseAbout Data Base
About Data Base
 
Management information system-MIS
Management information system-MISManagement information system-MIS
Management information system-MIS
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Classification of Compilers

  • 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)

Notas do Editor

  1. Code improvement - unclear slide