diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index ef1ec5f51c9484113fc99010f5d6ad777e973d9f..78fbfb5dd8a9517fa6b5c989cdbaef6b7c5832e7 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -14883,7 +14883,7 @@ void SMPFunction::AnalyzeLoopIterations(void) { } FILE *InfoAnnotFile = global_STARS_program->GetInfoAnnotFile(); // NOTE: Replace WRITE with READ or RANGE in annotation - SMP_fprintf(InfoAnnotFile, "%18llx %6zu INSTR STATICMEMWRITE MIN ", (uint64_t) MemReadAddr, InstSize); + SMP_fprintf(InfoAnnotFile, "%18llx %6zu INSTR STATICMEMREAD MIN ", (uint64_t) MemReadAddr, InstSize); if (LowerBoundVal == UpperBoundVal) { // A simple read from a static mem address with no index registers has // the same expr for lower bound and upper bound. Use the ByteWidth to @@ -15009,8 +15009,15 @@ void SMPFunction::AnalyzeLoopIterations(void) { if (IsImmedGlobalAddress(FinalAddr)) { size_t InstSize = CurrInst->GetSize(); STARS_uval_t UpperBoundVal = (STARS_uval_t)0xfffffffffffffffe; // Code for unknown limit value - SMP_fprintf(InfoAnnotFile, "%18llx %6zu INSTR STATICMEMWRITE MIN %llx LIMIT %llx ZZ %s\n", - (uint64_t)InstAddr, InstSize, (uint64_t)FinalAddr, (uint64_t)UpperBoundVal, CurrInst->GetDisasm()); + if (CurrInst->HasIndirectMemoryWrite()) { + SMP_fprintf(InfoAnnotFile, "%18llx %6zu INSTR STATICMEMWRITE MIN %llx LIMIT %llx ZZ %s\n", + (uint64_t)InstAddr, InstSize, (uint64_t)FinalAddr, (uint64_t)UpperBoundVal, CurrInst->GetDisasm()); + } + else { + assert(CurrInst->HasIndirectMemoryRead()); + SMP_fprintf(InfoAnnotFile, "%18llx %6zu INSTR STATICMEMREAD MIN %llx LIMIT %llx ZZ %s\n", + (uint64_t)InstAddr, InstSize, (uint64_t)FinalAddr, (uint64_t)UpperBoundVal, CurrInst->GetDisasm()); + } } } } @@ -18349,6 +18356,15 @@ void SMPFunction::Dump(void) { SMP_msg("\n"); } + if (global_STARS_program->ShouldSTARSTranslateToSPARKAda()) { + for (size_t BlockIndex = 0; BlockIndex < this->ShadowCFGBlocks.size(); ++BlockIndex) { + STARSCFGBlock *CFGBlock = this->ShadowCFGBlocks[BlockIndex]; + if (CFGBlock->IsCoalesced()) { + SMP_msg("SPARK: Block %d has been coalesced into CFG block %zu.\n", CFGBlock->GetOriginalBlockNum(), BlockIndex); + } + } + } + for (CurrBlock = this->Blocks.begin(); CurrBlock != this->Blocks.end(); ++CurrBlock) { // Dump out the block number and data flow sets before the instructions. (*CurrBlock)->Dump();