greater ZAM optimization of inlined function calls

This commit is contained in:
Vern Paxson 2023-11-06 07:03:17 -08:00 committed by Arne Welzel
parent e3b75ac391
commit b489cfc508
13 changed files with 130 additions and 95 deletions

View file

@ -740,8 +740,8 @@ bool StmtList::ReduceStmt(unsigned int& s_i, std::vector<StmtPtr>& f_stmts, Redu
}
}
if ( c->IsCSE(a, var, rhs.get()) ) {
// printf("discarding %s as unnecessary\n", obj_desc(a));
if ( c->IsTemporary(var->Id()) && ! c->IsParamTemp(var->Id()) && c->IsCSE(a, var, rhs.get()) ) {
// printf("discarding %s as unnecessary\n", var->Id()->Name());
// Skip this now unnecessary statement.
return true;
}