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