Value Numbering


## VN
1. Give each value a number (ID) – value number
2. Store value numbers in a hash table
3. Search for the numbers as needed
Give a variable a new name when it is redefined
pointer assignment forces every variable to increase its version number

### Extension
- Handle commutative operations
- Add constant folding to VN




[LVN (local value numbering)](https://texonom.com/lvn-local-value-numbering-7b077ede31c140b788df792c968240fb)


[SVN (Superlocal Value Numbering)](https://texonom.com/svn-superlocal-value-numbering-0a4f996f8061425ea1b859ed0b62fa3b)


[Dominance-based Value Numbering (DVN)](https://texonom.com/dominance-based-value-numbering-dvn-975fff04bb8749f598a76ff04376eb8b)


[Global Common Subexpression Elimination (GCSE)](https://texonom.com/global-common-subexpression-elimination-gcse-a162efc54f6144a6b7f7051e6fc9d8ce)






