Skip to content

Commit

Permalink
Merge pull request #203 from a7ehuo/fix-local-transparency-volatile-s…
Browse files Browse the repository at this point in the history
…tore

(v0.46) Kill prior store nodes in processing volatile store in local transparency
  • Loading branch information
vijaysun-omr authored Jun 2, 2024
2 parents 4f15d6a + 64df06d commit f5a3469
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions compiler/optimizer/LocalTransparency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,18 @@ void TR_LocalTransparency::updateUsesAndDefs(TR::Node *node, ContainerType *glob
*globallySeenDefinedSymbolReferences |= *tempContainer;
tempContainer->reset(symRefNum);
*seenDefinedSymbolReferences |= *tempContainer;

// If this is a volatile store, it should kill any store node that has appeared
// earlier in the block. Otherwise, the store node could survive the block
// in local transparency but will be killed in _downwardExposedAnalysisInfo
// when the volatile store is processed in local anticipatability, which causes
// inconsistency between local transparency and local anticipatability.
// This matches how a call node is processed earlier.
if (node->mightHaveVolatileSymbolReference())
{
*tempContainer &= *seenStoredSymRefs;
*symRefsDefinedAfterStored |= *tempContainer;
}
}

seenStoredSymRefs->set(symRefNum);
Expand Down

0 comments on commit f5a3469

Please sign in to comment.