Skip to content

Commit

Permalink
Deprecate isMemcpyWithPadIfFoldable as it is unused
Browse files Browse the repository at this point in the history
Signed-off-by: Filip Jeremic <fjeremic@ca.ibm.com>
  • Loading branch information
fjeremic committed Aug 21, 2018
1 parent e838a5b commit 3700302
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
29 changes: 0 additions & 29 deletions compiler/z/codegen/OMRCodeGenerator.cpp
Expand Up @@ -4494,35 +4494,6 @@ bool OMR::Z::CodeGenerator::useMVCLForMemcpyWithPad(TR::Node *node, TR_MemCpyPad
return useMVCL;
}

bool OMR::Z::CodeGenerator::isMemcpyWithPadIfFoldable(TR::Node *node, TR_MemCpyPadTypes type)
{
TR::Node *equalNode =node->getChild(TR_MEMCPY_PAD_EQU_LEN_INDEX);

if (type == OneByte || type == TwoByte) // non-ND cases are always foldable
{
return true;
}
else if (self()->inlineNDmemcpyWithPad(node) &&
equalNode->getOpCode().isLoadConst() &&
equalNode->get64bitIntegralValue() == 1)
{
// In the equal case of NDmemcpyWithPad, the evaluation to MVCL can be avoided. Thus CC is not established.
// Therefore NDmemcpyWithPad is not foldable. Ref: inlineMemcpyWithPadEvaluator.
return false;
}
else if (self()->useMVCLForMemcpyWithPad(node, type)) // smaller (fits in MVCL) ND cases are also foldable
{
return true;
}
else
{
// what remains is large or unknown max length ND cases that require an explicit overlap check in the evaluator
// that make if folding not possible (leads to reg assigner bugs due to complex control flow and avoiding this
// ends up needing code on par with the non-folded case anyway)
return false;
}
}

bool OMR::Z::CodeGenerator::isValidCompareConst(int64_t compareConst)
{
const int MIN_FOLDABLE_CC = 0;
Expand Down
1 change: 0 additions & 1 deletion compiler/z/codegen/OMRCodeGenerator.hpp
Expand Up @@ -328,7 +328,6 @@ class OMR_EXTENSIBLE CodeGenerator : public OMR::CodeGenerator

void genCopyFromLiteralPool(TR::Node *node, int32_t bytesToCopy, TR::MemoryReference *targetMR, size_t litPoolOffset, TR::InstOpCode::Mnemonic op = TR::InstOpCode::MVC);

bool isMemcpyWithPadIfFoldable(TR::Node *node, TR_MemCpyPadTypes type);
bool useMVCLForMemcpyWithPad(TR::Node *node, TR_MemCpyPadTypes type);
bool isValidCompareConst(int64_t compareConst);
bool isIfFoldable(TR::Node *node, int64_t compareConst);
Expand Down

0 comments on commit 3700302

Please sign in to comment.