Emit target-specific code that performs a strcpy or stpcpy, in cases where that is faster than a libcall.
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;
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.
Result and chain SDValues, or nulls to use a libcall.
| Name | Description |
|---|---|
| DAG | SelectionDAG providing context. |
| DL | Debug location for new nodes. |
| Chain | Incoming chain operand. |
| Dest | Destination string pointer. |
| Src | Source string pointer. |
| DestPtrInfo | Pointer info for the destination. |
| SrcPtrInfo | Pointer info for the source. |
| isStpcpy | True to emit stpcpy rather than strcpy. |
| CI | Call instruction being expanded, if any. |