Explore tens of thousands of sets crafted by our community.
Compiler Basics
30
Flashcards
0/30
Intermediate Code Generation
After semantic analysis, the compiler generates a low-level or intermediate representation of the source code.
Interprocedural Optimization
Optimizations that analyze multiple functions or methods together, which can span multiple files or modules.
Parse Tree
A hierarchical structure that represents the syntax of the source code as derived from a grammar.
Basic Block
A straight-line code sequence with no branches in except to the entry and no branches out except at the exit.
Lexical Analysis
The first phase of a compiler where the source code is converted into tokens.
Inlining
An optimization technique that involves replacing a function call with the body of the called function.
Semantic Analysis
The compiler phase that checks for semantic errors, ensures type compatibility, and collects type information.
Just-In-Time Compilation (JIT)
A compilation approach where code is compiled during execution (runtime) rather than beforehand.
Escape Analysis
A method of determining if a pointer or a reference to a resource can be accessed beyond the scope it was created in.
Quadruples
An intermediate code representation that expresses operations in a structured four-part format.
Constant Propagation
The process of substituting the values of known constants in expressions at compile time.
Type Casting
Converting a variable from one data type to another, for example, an integer to a float.
Garbage Collection
The automatic process of memory deallocation for objects that are no longer accessible by a program.
Static Single Assignment (SSA)
A property of an intermediate representation (IR), which requires each variable to be assigned exactly once and defined before use.
Code Generation
The process of converting intermediate code into target machine code.
Syntax Analysis
The phase where tokens are organized into a parse tree which represents the grammatical structure of program code.
Tokens
The smallest individual units in a program, created in the lexical analysis phase, such as keywords, identifiers, and operators.
Control Flow Graph (CFG)
A representation, used in program analysis, that depicts all paths that might be traversed through a program during its execution.
Symbol Table
Data structure used by a compiler to keep track of information about language constructs like variables, functions, classes, etc.
Abstract Syntax Tree (AST)
A tree representation of the abstract syntactic structure of source code written in a programming language.
Dead Code Elimination
An optimization that removes code which does not affect the program results (such as instructions following an unconditional jump).
Code Optimization
The process of improving intermediate code so it runs faster and consumes fewer resources.
Loop Optimization
The process of increasing the execution speed and efficiency of loops in a program.
Peephole Optimization
A code optimization technique that examines and improves small parts of machine code or intermediate code.
Data Flow Analysis
A technique used for gathering information about the possible set of values calculated at various points in a computer program.
Backpatching
A method used in compilers to manage jumps to forward locations or unresolved addresses in the code.
Constant Folding
The process of recognizing and evaluating constant expressions at compile time rather than computing them at runtime.
Register Allocation
The process of assigning a large number of target program variables onto a small number of CPU registers.
Three-Address Code
An intermediate code form used by compilers where each instruction contains at most three operands.
Tail Call Optimization
A technique that allows for some kinds of function calls to be replaced by a single jump instruction, reducing the overhead of recursion.
© Hypatia.Tech. 2024 All rights reserved.