Click Here For IIT Kanpur Notes - https://goo.gl/Ju1oV6

Thursday, 30 January 2014

Compiler Notes___________IIT-BHU [Home Made Notes] Free Download

CLick Here For Free All MadeEasy Sample Paper download - https://goo.gl/zdBmvx



Click/Like This Post On FaceBook-

Note: This Note is Prepared By one of The Gems Of IIT-BHU For You Guys...!!

Please Download And Share In Your Frnds..!!


____________Compiler Notes(Click here)_______________

Stay Update For EveryNotes Of GATE

A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code).The most common reason for wanting to transform source code is to create an executable program.

The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code). If the compiled program can run on a computer whose CPU or operating system is different from the one on which the compiler runs, the compiler is known as a cross-compiler. A program that translates from a low level language to a higher level one is a decompiler. A program that translates between high-level languages is usually called a language translator, source to source translator, or language converter. A language rewriter is usually a program that translates the form of expressions without a change of language.

Structure of a compiler

Compilers bridge source programs in high-level languages with the underlying hardware. A compiler verifies code syntax, generates efficient object code, performs run-time organization, and formats the output according to assembler and linker conventions. A compiler consists of:
  1. The front end: Verifies syntax and semantics, and generates an intermediate representation or IR of the source code for processing by the middle-end. Performs type checking by collecting type information. Generates errors and warning, if any, in a useful way.
  2. The middle end: Performs optimizations, including removal of useless or unreachable code, discovery and propagation of constant values, relocation of computation to a less frequently executed place (e.g., out of a loop), or specialization of computation based on the context. Generates another IR for the backend.
  3. The back end: Generates the assembly code, performing register allocation in process. (Assigns processor registers for the program variables where possible.) Optimizes target code utilization of the hardware by figuring out how to keep parallel execution units busy, filling delay slots. Although most algorithms for optimization are in NP, heuristic techniques are well-developed.



Don't Forgt To Hit Like

No comments:

Post a Comment