Advanced Compiler
Reading
Introduction
- type based aliases - different types always treats as non-aliases
Data flow analysis
- Even/odd: Determine if a variable at some point is even or odd
- Sign analysis
May vs. Must analysis
where static analysis
- tokenizer
- parsing -> AST (type checking … )
- …
- Control flow graph –
- function call - assume the worst
sign analysis
- abstract values - a set mapped to the best possible concrete value
- concrete values - reduce to a set of real values
- move up the lattice from buttom
- transfer function, operation between abstract values
Data race vs race condition
- Data race - multiple treads access same memory location - one of them writes - not protected by mutual lock
race condition - give erroneous output by multithreading
Rematerialization: recompute available equations