removal of unused functionality and some follow-on simplifications

This commit is contained in:
Vern Paxson 2023-06-16 16:16:13 -07:00 committed by Arne Welzel
parent ecc93606c4
commit b6b4a81e0d
9 changed files with 17 additions and 143 deletions

View file

@ -33,20 +33,9 @@ void ZAMCompiler::Init()
{
InitGlobals();
InitArgs();
InitCaptures();
InitLocals();
#if 0
// Complain about unused aggregates ... but not if we're inlining,
// as that can lead to optimizations where they wind up being unused
// but the original logic for using them was sound.
if ( ! analysis_options.inliner )
for ( auto a : pf->Inits() )
{
if ( pf->Locals().find(a) == pf->Locals().end() )
reporter->Warning("%s unused", a->Name());
}
#endif
TrackMemoryManagement();
non_recursive = non_recursive_funcs.count(func) > 0;
@ -216,11 +205,6 @@ StmtPtr ZAMCompiler::CompileBody()
// Could erase insts1 here to recover memory, but it's handy
// for debugging.
#if 0
if ( non_recursive )
func->UseStaticFrame();
#endif
auto zb = make_intrusive<ZBody>(func->Name(), this);
zb->SetInsts(insts2);