diff --git a/src/base/SMPFunction.cpp b/src/base/SMPFunction.cpp index 7d23579a272803875880e3f95a17575aa9fbf14b..3ebaaa8decbf9994fa70069e4a5c41355a324b04 100644 --- a/src/base/SMPFunction.cpp +++ b/src/base/SMPFunction.cpp @@ -4612,6 +4612,11 @@ bool SMPFunction::PropagateGlobalMetadata(const STARSOpndTypePtr &UseOp, SMPMeta return changed; } + if (STARS_LIVEIN_PSEUDO_ID == DefAddr) { + // Seems to only happen on STARS/IRDB. Need to debug later. !!!!****!!!! + return changed; + } + if (!STARS_IsBlockNumPseudoID(DefAddr)) { // found a DEF inst. SMPInstr *CurrInst = this->GetInstFromAddr(DefAddr); STARS_ea_t InstAddr = DefAddr; @@ -9168,6 +9173,7 @@ bool SMPFunction::FindShadowingPoint(const STARS_ea_t ShadowCheckAddr, const STA this->RemoveLocalRefs(SearchSet); CurrBlock = this->RPOBlocks[(size_t) BlockIndex]; + bool UnsafeMemWriteSeen = false; for (InstIter = CurrBlock->GetRevInstCBegin(); InstIter != CurrBlock->GetRevInstCEnd(); ++InstIter) { SMPInstr *CurrInst = (*InstIter); STARS_ea_t InstAddr = CurrInst->GetAddr(); @@ -9183,11 +9189,14 @@ bool SMPFunction::FindShadowingPoint(const STARS_ea_t ShadowCheckAddr, const STA pair<STARSDefUseIter, bool> InsertResult = SearchSet.insert(*UseIter); // might not be new insert; USE can be copied into 2 DEFs ShadowAddr = InstAddr; // highest copy addr seen so far ShadowOp = UseOp; // highest copy source seen so far - if (DefIter->HasIndirectWrite()) { + if (UnsafeMemWriteSeen || DefIter->HasIndirectWrite()) { UnsafeChain = true; } } } + if (!UnsafeMemWriteSeen && CurrInst->HasIndirectMemoryWrite()) { + UnsafeMemWriteSeen = true; + } } // end for all insts in block, reverse iteration } // end for all blocks prior to CriticalOp block, RPO descending order }