Directed Acyclic Graph (DAG) is a tool that depicts the structure of basic blocks, helps to see the flow of values flowing among the basic blocks, and offers optimizatino too. 1
A directed acyclic graph (DAG) for a basic block:
DAG provides easy transformation on basic blocks.
Peephole Optimizations: works locally to transform the input code into an optimized code. By locally, we mean a small portion of the code block at hand. These methods can be applied on intermediate codes as well as on target codes. Possible optimizations are: redundant instruction elimination; unreachable code; flow of control optimization; algebraic expression simplification; strength reduction, replace operations that consume more time and space with other operations that consume less time and space, but produce the same result (x * 2 –> x << 1); access machine instructions, leverage target machine’s sophisticated instructions.
More at Compiler Design - Code Generation
Input: a basic block
Output: a DAG, where:
More at DAG representation for basic blocks see
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?