Skip to content

Commit

Permalink
Remove inlineNDmemcpyWithPad and fold code assuming false
Browse files Browse the repository at this point in the history
This function always returns a constant false in OMR.  It is not used
in any known downstream projects.  Remove and fold surrounding code
assuming it returns false.

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Jun 14, 2019
1 parent dc4d1d3 commit 073acff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
13 changes: 2 additions & 11 deletions compiler/z/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2258,7 +2258,7 @@ OMR::Z::CodeGenerator::doBinaryEncoding()
// overload of the constructor which can accept a NULL preceding instruction. If cursor is NULL the generated
// label instruction will be prepended to the start of the instruction stream.
_methodBegin = new (self()->trHeapMemory()) TR::S390LabelInstruction(TR::InstOpCode::LABEL, self()->comp()->getStartTree()->getNode(), generateLabelSymbol(self()), static_cast<TR::Instruction*>(NULL), self());

_methodEnd = generateS390LabelInstruction(self(), TR::InstOpCode::LABEL, self()->comp()->findLastTree()->getNode(), generateLabelSymbol(self()));

TR_S390BinaryEncodingData data;
Expand All @@ -2272,7 +2272,7 @@ OMR::Z::CodeGenerator::doBinaryEncoding()
if (self()->comp()->getJittedMethodSymbol()->isJNI() && !self()->comp()->getOption(TR_FullSpeedDebug))
{
data.preProcInstruction = TR::Compiler->target.is64Bit() ?
data.cursorInstruction->getNext()->getNext()->getNext() :
data.cursorInstruction->getNext()->getNext()->getNext() :
data.cursorInstruction->getNext()->getNext();
}
else
Expand Down Expand Up @@ -5281,15 +5281,6 @@ bool OMR::Z::CodeGenerator::IsInMemoryType(TR::DataType type)
#endif
}

/**
* Determine if the Left-to-right copy semantics is allowed on NDmemcpyWithPad
* Communicates with the evaluator to do MVC semantics under certain condition no matter how the overlap is
*/
bool OMR::Z::CodeGenerator::inlineNDmemcpyWithPad(TR::Node * node, int64_t * maxLengthPtr)
{
return false;
}


uint32_t getRegMaskFromRange(TR::Instruction * inst);

Expand Down
1 change: 0 additions & 1 deletion compiler/z/codegen/OMRCodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ class OMR_EXTENSIBLE CodeGenerator : public OMR::CodeGenerator

bool supportsLengthMinusOneForMemoryOpts() {return true;}

bool inlineNDmemcpyWithPad(TR::Node * node, int64_t * maxLengthPtr = NULL);
bool codegenSupportsLoadlessBNDCheck() {return TR::Compiler->target.cpu.getSupportsArch(TR::CPU::zEC12);}
TR::Register *evaluateLengthMinusOneForMemoryOps(TR::Node *, bool , bool &lenMinusOne);

Expand Down
11 changes: 1 addition & 10 deletions compiler/z/codegen/OpMemToMem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,6 @@ MemToMemVarLenMacroOp::generateLoop()
bool
MemToMemVarLenMacroOp::needsLoop()
{
int64_t maxLength = 0;
if (_cg->inlineNDmemcpyWithPad(_rootNode, &maxLength))
{
if (maxLength == 0 || maxLength > 256)
return true;
else
return false;
}

return true;
}

Expand Down Expand Up @@ -357,7 +348,7 @@ MemToMemConstLenMacroOp::generateLoop()
uint64_t dstOffset = 0;


if (inRange && (aliasingPattern || !_cg->storageMayOverlap(_srcNode, len, _dstNode, len)) && !_cg->inlineNDmemcpyWithPad(_rootNode))
if (inRange && (aliasingPattern || !_cg->storageMayOverlap(_srcNode, len, _dstNode, len)))
{
TR::InstOpCode::Mnemonic opCode = TR::InstOpCode::MVCL;

Expand Down

0 comments on commit 073acff

Please sign in to comment.