Skip to content

Commit

Permalink
Deprecate blockIndex in Power
Browse files Browse the repository at this point in the history
Related to: #5293

Signed-off-by: Annabelle Huo <Annabelle.Huo@ibm.com>
  • Loading branch information
a7ehuo committed Apr 28, 2021
1 parent ef9fa86 commit 1d89b25
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 22 deletions.
2 changes: 0 additions & 2 deletions compiler/p/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,6 @@ void OMR::Power::CodeGenerator::doRegisterAssignment(TR_RegisterKinds kindsToAss

self()->tracePreRAInstruction(instructionCursor);

self()->setCurrentBlockIndex(instructionCursor->getBlockIndex());

instructionCursor->assignRegisters(TR_GPR);

// Maintain Internal Control Flow Depth
Expand Down
11 changes: 0 additions & 11 deletions compiler/p/codegen/OMRCodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,17 +288,6 @@ class OMR_EXTENSIBLE CodeGenerator : public OMR::CodeGenerator

bool getSupportsEncodeUtf16BigWithSurrogateTest();

// Active counter used to track control flow basic blocks generated at instruction selection.
int32_t _nextAvailableBlockIndex;
// The index of the current basic block (used and updated during instruction selection).
int32_t _currentBlockIndex;

void setNextAvailableBlockIndex(int32_t blockIndex) { _nextAvailableBlockIndex = blockIndex; }
int32_t getNextAvailableBlockIndex() { return _currentBlockIndex = _nextAvailableBlockIndex; }
void incNextAvailableBlockIndex() { _nextAvailableBlockIndex++; }

void setCurrentBlockIndex(int32_t blockIndex) { _currentBlockIndex = blockIndex; }
int32_t getCurrentBlockIndex() { return _currentBlockIndex; }
int32_t arrayInitMinimumNumberOfBytes() {return 32;}

TR::SymbolReference &getDouble2LongSymbolReference() { return *_symRefTab->findOrCreateRuntimeHelper(TR_PPCdouble2Long); }
Expand Down
4 changes: 1 addition & 3 deletions compiler/p/codegen/OMRInstruction.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2020 IBM Corp. and others
* Copyright (c) 2000, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -46,15 +46,13 @@ OMR::Power::Instruction::Instruction(TR::CodeGenerator *cg, TR::Instruction *pre
_conditions(0),
_asyncBranch(false)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
}

OMR::Power::Instruction::Instruction(TR::CodeGenerator *cg, TR::InstOpCode::Mnemonic op, TR::Node *node)
: OMR::Instruction(cg, op, node),
_conditions(0),
_asyncBranch(false)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
}

TR::Register*
Expand Down
5 changes: 0 additions & 5 deletions compiler/p/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
virtual bool isAsyncBranch() { return _asyncBranch;}
virtual bool setAsyncBranch() { return (_asyncBranch = true);}

// Basic Block Index Routines
int32_t getBlockIndex() { return _blockIndex; }
void setBlockIndex(int32_t i) { _blockIndex = i; }

void PPCNeedsGCMap(uint32_t mask);

virtual TR::Register *getMemoryDataRegister();
Expand Down Expand Up @@ -190,7 +186,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
private:
// TR::InstOpCode _opcode;
uint8_t _estimatedBinaryLength;
int32_t _blockIndex;
TR::RegisterDependencyConditions *_conditions;
bool _asyncBranch;

Expand Down
1 change: 0 additions & 1 deletion compiler/p/codegen/PPCSystemLinkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ TR::PPCSystemLinkage::createPrologue(
void
TR::PPCSystemLinkage::createEpilogue(TR::Instruction *cursor)
{
int32_t blockNumber = cursor->getNext()->getBlockIndex();
TR::Machine *machine = cg()->machine();
const TR::PPCLinkageProperties &properties = getProperties();
TR::ResolvedMethodSymbol *bodySymbol = comp()->getJittedMethodSymbol();
Expand Down

0 comments on commit 1d89b25

Please sign in to comment.