Getting the "Minimum" SSA from LLVM

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?

+4
source share
1 answer

LLVM has no support for the formation of anything other than a truncated form of SSA, and such a mechanism is unlikely to grow. We quite literally do not even do the work of synthesizing this information when installing phi.

+1
source

All Articles