streamline generated -O C++ code by relying on per-function profiles rather than aggregate profile

This commit is contained in:
Vern Paxson 2024-12-06 16:23:32 -08:00
parent 79c5790bbf
commit 612d99e751
3 changed files with 43 additions and 12 deletions

View file

@ -308,9 +308,8 @@ string CPPCompile::GenCallExpr(const CallExpr* c, GenType gt, bool top_level) {
if ( pfs->BiFGlobals().count(f_id) == 0 )
gen += +"->AsFunc()";
else if ( pfs->Globals().count(f_id) > 0 )
// The BiF version has an extra "_", per
// AddBiF(..., true).
else if ( accessed_globals.count(f_id) > 0 )
// The BiF version has an extra "_", per AddBiF(..., true).
gen = globals[string(id_name) + "_"];
}