Maintain instruction to block mapping in phi insertion
authorAlan Baker <alanbaker@google.com>
Thu, 11 Jan 2018 20:05:39 +0000 (15:05 -0500)
committerAlan Baker <alanbaker@google.com>
Fri, 12 Jan 2018 15:16:53 +0000 (10:16 -0500)
commiteb0c73dad6102fc0d4f03c62fe910348bae43a11
treed448b6e41d5f3bcc53fafd31d1a5f4d0976a33ac
parent5eafc00ad58266dc574d9defd6cba83bee566956
Maintain instruction to block mapping in phi insertion

* Changed MemPass::InsertPhiInstructions to set basic blocks for new
phis
* Local SSA elim now maintains instr to block mapping
 * Added a test and confirmed it fails without the updated phis
* IRContext::set_instr_block no longer builds the map if the analysis is
invalid
* Added instruction to block mapping verification to
IRContext::IsConsistent()
source/opt/ir_context.cpp
source/opt/ir_context.h
source/opt/local_ssa_elim_pass.h
source/opt/mem_pass.cpp
test/opt/local_ssa_elim_test.cpp