optimize return value to have less one ite expression
this code should go away with a proper disjoint ite tracker
MODIFY
ir/state.cpp
ir/state.cpp
@@ -142,8 +142,12 @@ void State::addCondJump(const StateValue &cond, const BasicBlock &dst_true,
}
void State::addReturn(const StateValue &val) {
- return_domain |= domain.first;
+ if (return_domain.isFalse()) {
+ return_val.first = val;
+ } else {
return_val.first = StateValue::mkIf(domain.first, val, return_val.first);
+ }
+ return_domain |= domain.first;
return_val.second.insert(undef_vars.begin(), undef_vars.end());
return_val.second.insert(domain.second.begin(), domain.second.end());
undef_vars.clear();

optimize return value to have less one ite expression
this code should go away with a proper disjoint ite tracker