fixed -O dump-final-ZAM to work in conjunction with -O no-ZAM-opt

This commit is contained in:
Vern Paxson 2024-11-28 16:36:28 -08:00
parent a2a47ba334
commit 5feadf5d69

View file

@ -404,10 +404,9 @@ void ZAMCompiler::Dump() {
} }
} }
else if ( analysis_options.dump_final_ZAM ) { else if ( analysis_options.dump_final_ZAM ) {
ASSERT(remapped_frame);
printf("\nFrame for %s:\n", func->GetName().c_str()); printf("\nFrame for %s:\n", func->GetName().c_str());
if ( remapped_frame ) {
for ( auto i = 0U; i < shared_frame_denizens.size(); ++i ) { for ( auto i = 0U; i < shared_frame_denizens.size(); ++i ) {
printf("frame[%d] =", i); printf("frame[%d] =", i);
for ( auto& id : shared_frame_denizens[i].ids ) for ( auto& id : shared_frame_denizens[i].ids )
@ -415,6 +414,10 @@ void ZAMCompiler::Dump() {
printf("\n"); printf("\n");
} }
} }
else
for ( const auto& elem : frame_layout1 )
printf("frame[%d] = %s\n", elem.second, elem.first->Name());
}
if ( ! insts2.empty() ) if ( ! insts2.empty() )
printf("Final code for %s:\n", func->GetName().c_str()); printf("Final code for %s:\n", func->GetName().c_str());