Skip to content

Commit

Permalink
Deprecate blockIndex in riscv
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 1d89b25 commit 901a96f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
4 changes: 1 addition & 3 deletions compiler/riscv/codegen/OMRCodeGenerator.cpp
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2020 IBM Corp. and others
* Copyright (c) 2019, 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 @@ -179,8 +179,6 @@ OMR::RV::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/riscv/codegen/OMRInstruction.cpp
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2020 IBM Corp. and others
* Copyright (c) 2019, 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 @@ -35,23 +35,20 @@ OMR::RV::Instruction::Instruction(TR::CodeGenerator *cg, TR::InstOpCode::Mnemoni
: OMR::Instruction(cg, op, node),
_conditions(NULL)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
}


OMR::RV::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::RV::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->incRegisterTotalUseCounts(cg);
}
Expand All @@ -61,7 +58,6 @@ OMR::RV::Instruction::Instruction(TR::CodeGenerator *cg, TR::Instruction *preced
: OMR::Instruction(cg, precedingInstruction, op, node),
_conditions(cond)
{
self()->setBlockIndex(cg->getCurrentBlockIndex());
if (cond)
cond->incRegisterTotalUseCounts(cg);
}
Expand Down
15 changes: 1 addition & 14 deletions compiler/riscv/codegen/OMRInstruction.hpp
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2020 IBM Corp. and others
* Copyright (c) 2019, 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 @@ -150,18 +150,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 @@ -238,7 +226,6 @@ class OMR_EXTENSIBLE Instruction : public OMR::Instruction
virtual TR::BtypeInstruction *getBtypeInstruction();

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

Expand Down

0 comments on commit 901a96f

Please sign in to comment.