Skip to content

Commit

Permalink
Deprecate blockIndex in aarch64 and arm
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 8b6089f commit ef9fa86
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
2 changes: 0 additions & 2 deletions compiler/aarch64/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,6 @@ OMR::ARM64::CodeGenerator::doRegisterAssignment(TR_RegisterKinds kindsToAssign)

self()->tracePreRAInstruction(instructionCursor);

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

instructionCursor->assignRegisters(TR_GPR);

// Maintain Internal Control Flow Depth
Expand Down
6 changes: 1 addition & 5 deletions compiler/aarch64/codegen/OMRInstruction.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2020 IBM Corp. and others
* Copyright (c) 2018, 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 @@ -32,23 +32,20 @@ OMR::ARM64::Instruction::Instruction(TR::CodeGenerator *cg, TR::InstOpCode::Mnem
: OMR::Instruction(cg, op, node),
_conditions(NULL)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
}


OMR::ARM64::Instruction::Instruction(TR::CodeGenerator *cg, TR::Instruction *precedingInstruction, TR::InstOpCode::Mnemonic op, TR::Node *node)
: OMR::Instruction(cg, precedingInstruction, op, node),
_conditions(NULL)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
}


OMR::ARM64::Instruction::Instruction(TR::CodeGenerator *cg, TR::InstOpCode::Mnemonic op, TR::RegisterDependencyConditions *cond, TR::Node *node)
: OMR::Instruction(cg, op, node),
_conditions(cond)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
if (cond)
cond->bookKeepingRegisterUses(self(), cg);
}
Expand All @@ -58,7 +55,6 @@ OMR::ARM64::Instruction::Instruction(TR::CodeGenerator *cg, TR::Instruction *pre
: OMR::Instruction(cg, precedingInstruction, op, node),
_conditions(cond)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
if (cond)
cond->bookKeepingRegisterUses(self(), cg);
}
Expand Down
15 changes: 1 addition & 14 deletions compiler/aarch64/codegen/OMRInstruction.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2018, 2020 IBM Corp. and others
* Copyright (c) 2018, 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 @@ -159,18 +159,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
return (_conditions = cond);
}

/**
* @brief Gets the basic block index
* @return basic block index
*/
int32_t getBlockIndex() { return _blockIndex; }
/**
* @brief Sets the basic block index
* @param[in] i : basic block index
* @return basic block index
*/
void setBlockIndex(int32_t i) { _blockIndex = i; }

/**
* @brief Sets GCMap mask
* @param[in] cg : CodeGenerator
Expand Down Expand Up @@ -252,7 +240,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
void setWillBePatched(bool v = true) { v ? _index |= WillBePatched : _index &= ~WillBePatched; }

private:
int32_t _blockIndex;
TR::RegisterDependencyConditions *_conditions;
};

Expand Down
4 changes: 1 addition & 3 deletions compiler/arm/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 @@ -67,15 +67,13 @@ OMR::ARM::Instruction::Instruction(TR::CodeGenerator *cg, TR::Instruction *prece
_conditions(0),
_asyncBranch(false)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
}

OMR::ARM::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());
}

// TODO: need to fix the InstOpCode initialization
Expand Down
6 changes: 1 addition & 5 deletions compiler/arm/codegen/OMRInstruction.hpp
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 @@ -91,9 +91,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
TR_ARMOpCodes getRecordFormOpCode() {return _opcode.getRecordFormOpCodeValue();}
TR_ARMOpCodes setOpCodeValue(TR_ARMOpCodes op) {return _opcode.setOpCodeValue(op);}

int32_t getBlockIndex() { return _blockIndex; }
void setBlockIndex(int32_t i) { _blockIndex = i; }

void ARMNeedsGCMap(uint32_t mask);

TR_ARMConditionCode getConditionCode() {return _conditionCode;}
Expand Down Expand Up @@ -214,7 +211,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction

private:
TR_ARMOpCode _opcode;
int32_t _blockIndex;
TR_ARMConditionCode _conditionCode;
TR::RegisterDependencyConditions *_conditions;
bool _asyncBranch;
Expand Down

0 comments on commit ef9fa86

Please sign in to comment.