aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-04-09 16:58:13 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-07-01 00:18:44 +0200
commit362b1cddefc33507ac55cb1c3a1ef1632367f3d2 (patch)
treed1fe349ba5e80a4d8801e0959b3c95f46908bd69 /validation/mem2reg
parent816250ccdf822a304ca3f1f15b789cc61e82f75a (diff)
downloadsparse-dev-362b1cddefc33507ac55cb1c3a1ef1632367f3d2.tar.gz
ssa: phase 2: rename load & stores
This implement the second phase of the classical SSA conversion: the renaming of variables but only for load & stores. The implementation doesn't use the stack based algorithm (which is quite hairy and can use a lot of memory) but a simpler solution where each BB keep track of the symbol-to-pseudo correspondance. This mapping is also done for phi-nodes (which are semantically close to loads) but the phi-nodes themselves are not renamed. This is done so that we can keep track of the unused phi-nodes and so have semi-pruned SSA. One thing worth of noticing is that in order to keep the mapping for phi-nodes it was needed to add a field to OP_PHI instructions to hold the original symbol pseudo (much like OP_LOAD). Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/mem2reg')
0 files changed, 0 insertions, 0 deletions