[decompiler] recognize more inlined vector functions (#637)

* detect vector+

* recognize reset
This commit is contained in:
water111
2021-06-27 12:11:30 -04:00
committed by GitHub
parent b19a2c82f0
commit bfb1fbe1fc
16 changed files with 592 additions and 797 deletions
+15 -1
View File
@@ -131,7 +131,12 @@ Form* FormStack::pop_reg(Register reg,
const RegSet& barrier,
const Env& env,
bool allow_side_effects,
int begin_idx) {
int begin_idx,
RegisterAccess* orig_out,
bool* found_orig_out) {
if (found_orig_out) {
*found_orig_out = false;
}
assert(allow_side_effects);
(void)env; // keep this for easy debugging.
RegSet modified;
@@ -158,9 +163,18 @@ Form* FormStack::pop_reg(Register reg,
assert(entry.sequence_point == false);
auto result = pop_reg(entry.non_seq_source->reg(), barrier, env, allow_side_effects, i);
if (result) {
if (found_orig_out) {
*found_orig_out = true;
*orig_out = *entry.destination;
}
return result;
}
}
if (found_orig_out) {
*found_orig_out = true;
*orig_out = *entry.destination;
}
return entry.source;
} else {
// we didn't match