Hashed SSA Form: HSSA - Mantione, Massimiliano; Chow, Fred (SSA-based Compiler Design, 2022)
SSA in its basic form is only applicable to scalar variables not involved in aliasing. We present extensions to traditional SSA that allow scalar variables affected by aliasing to be uniformly represented in SSA form. With aliasing, the number of SSA versions can increase rapidly. We describe a technique that can limit such an increase in SSA versions without sacrificing the quality of the SSA-based optimizations performed. Our techniques for modeling aliasing in SSA form further allow us to apply SSA form not just to scalar variables but also to any indirectly accessed memory location. We introduce the concept of virtual variables and use it to model indirect memory operations in SSA form. Because all indirect memory operations are based on address computations, global value numbering on the address computations can greatly increase the accuracy of their SSA form. To this end, we introduce Hashed SSA as the most effective representation of aliases and indirect memory operations, thus allowing all SSA-based optimizations to be uniformly applied to nonlocal variables and indirectly accessed memory locations.