summaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-16 11:29:37 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-16 11:29:37 +0000
commit4fc7355a21e1fa838406e15459aaf54a58fcf909 (patch)
tree0198bef41de5fcb25d5bf89940247980f28334a7 /include/llvm/Target
parente1b2af731e2a45344a7c502232f66c55cd746da0 (diff)
downloadllvm-4fc7355a21e1fa838406e15459aaf54a58fcf909.tar.gz
llvm-4fc7355a21e1fa838406e15459aaf54a58fcf909.tar.bz2
llvm-4fc7355a21e1fa838406e15459aaf54a58fcf909.tar.xz
[SystemZ] Use MVST to implement strcpy and stpcpy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetLibraryInfo.h3
-rw-r--r--include/llvm/Target/TargetSelectionDAGInfo.h15
2 files changed, 17 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h
index a033d07387..7a06415f4b 100644
--- a/include/llvm/Target/TargetLibraryInfo.h
+++ b/include/llvm/Target/TargetLibraryInfo.h
@@ -699,7 +699,8 @@ public:
case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl:
case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l:
case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l:
- case LibFunc::memcmp: case LibFunc::strcmp:
+ case LibFunc::memcmp: case LibFunc::strcmp: case LibFunc::strcpy:
+ case LibFunc::stpcpy:
return true;
}
return false;
diff --git a/include/llvm/Target/TargetSelectionDAGInfo.h b/include/llvm/Target/TargetSelectionDAGInfo.h
index 2d0989c8ff..5e65c304a1 100644
--- a/include/llvm/Target/TargetSelectionDAGInfo.h
+++ b/include/llvm/Target/TargetSelectionDAGInfo.h
@@ -109,6 +109,21 @@ public:
return std::make_pair(SDValue(), SDValue());
}
+ /// EmitTargetCodeForStrcpy - Emit target-specific code that performs a
+ /// strcpy or stpcpy, in cases where that is faster than a libcall.
+ /// 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.
+ virtual std::pair<SDValue, SDValue>
+ EmitTargetCodeForStrcpy(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
+ SDValue Dest, SDValue Src,
+ MachinePointerInfo DestPtrInfo,
+ MachinePointerInfo SrcPtrInfo,
+ bool isStpcpy) const {
+ return std::make_pair(SDValue(), SDValue());
+ }
+
/// EmitTargetCodeForStrcmp - Emit target-specific code that performs a
/// strcmp, in cases where that is faster than a libcall. The first
/// returned SDValue is the result of the strcmp and the second is