Skip to content

Commit

Permalink
Deprecate hasBeenVisited block API
Browse files Browse the repository at this point in the history
This API is not used anywhere.
  • Loading branch information
fjeremic committed Apr 30, 2021
1 parent a2c7728 commit 3d2a47c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 28 deletions.
5 changes: 1 addition & 4 deletions compiler/il/OMRBlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,6 @@ class OMR_EXTENSIBLE Block : public TR::CFGNode
void setIsSynchronizedHandler() { _flags.set(_isSynchronizedHandler); }
bool isSynchronizedHandler() { return _flags.testAny(_isSynchronizedHandler); }

void setHasBeenVisited(bool b = true) { _flags.set(_hasBeenVisited, b); }
bool hasBeenVisited() { return _flags.testAny(_hasBeenVisited); }

void setIsPRECandidate(bool b) { _flags.set(_isPRECandidate, b); }
bool isPRECandidate() { return _flags.testAny(_isPRECandidate); }

Expand Down Expand Up @@ -524,7 +521,7 @@ class OMR_EXTENSIBLE Block : public TR::CFGNode
_firstBlockInLoop = 0x00000020,
_branchingBackwards = 0x00000040,
_isSynchronizedHandler = 0x00000100,
_hasBeenVisited = 0x00000400,
// Available = 0x00000400,
_isPRECandidate = 0x00000800,
_isAdded = 0x00001000,
_isOSRInduceBlock = 0x00002000,
Expand Down
18 changes: 0 additions & 18 deletions compiler/optimizer/OMRSimplifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ static_assert(TR::NumIlOps ==
* Local helper functions
*/

static void resetBlockVisitFlags(TR::Compilation *comp)
{
for (TR::Block *block = comp->getStartBlock(); block != NULL; block = block->getNextBlock())
{
block->setHasBeenVisited(false);
}
}

static TR::TreeTop *findNextLegalTreeTop(TR::Compilation *comp, TR::Block *block)
{
vcount_t startVisitCount = comp->getStartTree()->getNode()->getVisitCount();
Expand Down Expand Up @@ -214,10 +206,6 @@ OMR::Simplifier::postPerformOnBlocks()
if (trace())
comp()->dumpMethodTrees("Trees after simplification");

#ifdef DEBUG
resetBlockVisitFlags(comp());
#endif

// Invalidate usedef and value number information if necessary
//
if (_useDefInfo && _invalidateUseDefInfo)
Expand Down Expand Up @@ -342,16 +330,10 @@ OMR::Simplifier::simplifyExtendedBlock(TR::TreeTop * treeTop)

if (b->isOSRCodeBlock() || b->isOSRCatchBlock())
{
b->setHasBeenVisited();
treeTop = b->getExit();
continue;
}

#ifdef DEBUG
if (block != b)
b->setHasBeenVisited();
#endif

if (!block && _reassociate &&
comp()->getFlowGraph()->getStructure() != NULL // [99391] getStructureOf() only valid if structure isn't invalidated
)
Expand Down
6 changes: 0 additions & 6 deletions compiler/z/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1711,12 +1711,6 @@ OMR::Z::CodeGenerator::doRegisterAssignment(TR_RegisterKinds kindsToAssign)
}
}

// Set all CFG Blocks unvisited
for (currBlock = self()->comp()->getStartBlock(); currBlock != NULL; currBlock = currBlock->getNextBlock())
{
currBlock->setHasBeenVisited(false);
}

while (instructionCursor)
{
TR::Node *treeNode=instructionCursor->getNode();
Expand Down

0 comments on commit 3d2a47c

Please sign in to comment.