Skipping LLVM opt -S -mem2reg creates the so-called "truncated" SSA - a form in which all dead phi functions are removed. I would like to store these phi instructions in IR, getting a βminimumβ SSA, but I cannot find an easy way to do this.
Am I doomed to implement the whole algorithm for building SSA from scratch or is there a way to do this using existing tools?
source share