Skip to content

Commit

Permalink
Deprecate getFirstReadWriteMemoryReference
Browse files Browse the repository at this point in the history
This function is no longer used and is not needed.

Signed-off-by: Filip Jeremic <fjeremic@ca.ibm.com>
  • Loading branch information
fjeremic committed Jan 15, 2020
1 parent 2b78ad9 commit cda8169
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 127 deletions.
124 changes: 1 addition & 123 deletions compiler/z/codegen/S390Instruction.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 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 @@ -5651,125 +5651,3 @@ TR::S390VirtualGuardNOPInstruction::generateBinaryEncoding()
return cursor;
}
#endif

TR::MemoryReference *getFirstReadWriteMemoryReference(TR::Instruction *i)
{
TR::MemoryReference *mr = NULL;
switch(i->getKind())
{
case TR::Instruction::IsRS:
case TR::Instruction::IsRSY:
mr = toS390RSInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsSMI:
mr = toS390SMIInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsMem:
case TR::Instruction::IsMemMem:
case TR::Instruction::IsSI:
case TR::Instruction::IsSIY:
case TR::Instruction::IsSIL:
case TR::Instruction::IsS:
case TR::Instruction::IsRSL:
case TR::Instruction::IsSS1:
case TR::Instruction::IsSS2:
case TR::Instruction::IsSS4:
case TR::Instruction::IsSSE:
case TR::Instruction::IsRXYb:
mr = toS390MemInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsRSLb:
mr = toS390RSLbInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsRX:
case TR::Instruction::IsRXE:
case TR::Instruction::IsRXY:
case TR::Instruction::IsSSF:
mr = toS390RXInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsRXF:
mr = toS390RXFInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsVRSa:
mr = toS390VRSaInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsVRSb:
mr = toS390VRSbInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsVRSc:
mr = toS390VRScInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsVRSd:
mr = static_cast<TR::S390VRSdInstruction*>(i)->getMemoryReference();
break;
case TR::Instruction::IsVRV:
mr = toS390VRVInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsVRX:
mr = toS390VRXInstruction(i)->getMemoryReference();
break;
case TR::Instruction::IsVSI:
mr = static_cast<TR::S390VSIInstruction*>(i)->getMemoryReference();
break;
case TR::Instruction::IsBranch:
case TR::Instruction::IsVirtualGuardNOP:
case TR::Instruction::IsBranchOnCount:
case TR::Instruction::IsBranchOnIndex:
case TR::Instruction::IsLabel:
case TR::Instruction::IsPseudo:
case TR::Instruction::IsNotExtended:
case TR::Instruction::IsImm:
case TR::Instruction::IsImm2Byte:
case TR::Instruction::IsImmSnippet:
case TR::Instruction::IsImmSym:
case TR::Instruction::IsReg:
case TR::Instruction::IsRR:
case TR::Instruction::IsRRD:
case TR::Instruction::IsRRE:
case TR::Instruction::IsRRF:
case TR::Instruction::IsRRF2:
case TR::Instruction::IsRRF3:
case TR::Instruction::IsRRF4:
case TR::Instruction::IsRRF5:
case TR::Instruction::IsRRR:
case TR::Instruction::IsRI:
case TR::Instruction::IsRIL:
case TR::Instruction::IsRRS: // Storage is branch destination
case TR::Instruction::IsRIS: // Storage is branch destination
case TR::Instruction::IsIE:
case TR::Instruction::IsRIE:
case TR::Instruction::IsMII:

case TR::Instruction::IsVRIa:
case TR::Instruction::IsVRIb:
case TR::Instruction::IsVRIc:
case TR::Instruction::IsVRId:
case TR::Instruction::IsVRIe:
case TR::Instruction::IsVRIf:
case TR::Instruction::IsVRIg:
case TR::Instruction::IsVRIh:
case TR::Instruction::IsVRIi:

case TR::Instruction::IsVRRa:
case TR::Instruction::IsVRRb:
case TR::Instruction::IsVRRc:
case TR::Instruction::IsVRRd:
case TR::Instruction::IsVRRe:
case TR::Instruction::IsVRRf:
case TR::Instruction::IsVRRg:
case TR::Instruction::IsVRRh:
case TR::Instruction::IsVRRi:

case TR::Instruction::IsNOP:
case TR::Instruction::IsI:
case TR::Instruction::IsE:
case TR::Instruction::IsOpCodeOnly:
mr = NULL;
break;
default:
TR_ASSERT( 0, "This type of instruction needs to be told how to get memory reference if any. opcode=%s kind=%d\n",i->getOpCode().getMnemonicName(),
i->getKind());
break;
}
return mr;
}
5 changes: 1 addition & 4 deletions compiler/z/codegen/S390Instruction.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2019 IBM Corp. and others
* Copyright (c) 2000, 2020 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 @@ -6352,7 +6352,4 @@ inline TR::S390VRXInstruction * toS390VRXInstruction(TR::Instruction *i)
{
return (TR::S390VRXInstruction *)i;
}

TR::MemoryReference *getFirstReadWriteMemoryReference(TR::Instruction *i);

#endif

0 comments on commit cda8169

Please sign in to comment.