llvm::SelectionDAGTargetInfo::EmitTargetCodeForStrcpy

Emit target-specific code that performs a strcpy or stpcpy, in cases where that is faster than a libcall.

Synopsis

Declared in <llvm/CodeGen/SelectionDAGTargetInfo.h>

virtual
std::pair<SDValue, SDValue>
EmitTargetCodeForStrcpy(
    SelectionDAG& DAG,
    SDLoc const& DL,
    SDValue Chain,
    SDValue Dest,
    SDValue Src,
    MachinePointerInfo DestPtrInfo,
    MachinePointerInfo SrcPtrInfo,
    bool isStpcpy,
    CallInst const* CI) const;

Description

The first returned SDValue is the result of the copy (the start of the destination string for strcpy, a pointer to the null terminator for stpcpy) and the second is the chain. Both SDValues can be null if a normal libcall should be used.

Return Value

Result and chain SDValues, or nulls to use a libcall.

Parameters

NameDescription
DAGSelectionDAG providing context.
DLDebug location for new nodes.
ChainIncoming chain operand.
DestDestination string pointer.
SrcSource string pointer.
DestPtrInfoPointer info for the destination.
SrcPtrInfoPointer info for the source.
isStpcpyTrue to emit stpcpy rather than strcpy.
CICall instruction being expanded, if any.