[intermediate representation] added ternary_inst

This commit is contained in:
Philippe Tillet
2019-02-26 14:20:58 -05:00
parent 68dea75aa0
commit 017702590b
8 changed files with 71 additions and 10 deletions

View File

@@ -155,7 +155,8 @@ ir::type *module::get_type(const std::string &name) {
void module::seal_block(ir::basic_block *block){
for(auto &x: incomplete_phis_[block]){
add_phi_operands(x.first, x.second);
set_value(x.first, try_remove_trivial_phis(x.second));
if(get_value(x.first) == x.second)
set_value(x.first, try_remove_trivial_phis(x.second));
}
sealed_blocks_.insert(block);
incomplete_phis_[block].clear();