Value numbering
Value numbering is a technique of determining when two computations in a program are equivalent and eliminating one of them with a semantics-preserving optimization.Global value numbering (GVN) is a compiler optimization based on the static single assignment form (SSA) intermediate representation.In IRs and source languages where rebinding (assigning to the same variable more than once) is possible, SSA form is required to perform GVN so that falseLVN is a local optimization, meaning that unlike global value numbering, it operates on a single basic block at a time.For example: By assigning numbers to instructions, comparing for duplicates is turned into simple integer comparisons.A simple implementation might also be unable to catch all equivalent expressions, even when they only differ by the order of their operands.