GVN: Global value numbering

Related Terms

Global value numbering (GVN) is a compiler optimization based on the SSA intermediate representation.

It sometimes helps eliminate redundant code that common subexpression evaluation (CSE) does not.

At the same time, however, CSE may eliminate code that GVN does not, so both are often found in modern compilers.

Global value numbering is distinct from local value numbering in that the value-number mappings hold across basic block boundaries as well, and different algorithms are used to compute the mappings.