None
EN
Optimizing Global Value Numbering
[]
Pointers Gone Wild
Each instruction is mapped to a number, and because SSA temporaries are immutable, the instructions that map to the same number are computing the same result (provided, of course, that the said instructions have no side-effects). Unfortunately, quick profiling revealed that GVN was actually the slowest pass of the Tachyon front-end, using about 18% of the total compilation time, or slightly more than half the time taken by all front-end passes combined. To optimize GVN, I decided to change the hash function to use the numerical value of the first character of each instruction's opcode, the SSA temporary numbers, and the value of integer constants in computing the hash function.