summaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-16 11:41:43 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-08-16 11:41:43 +0000
commit19262ee0725a09b7c621a3d2eb66ba1513ae932a (patch)
tree848fa9a49ad86171c7aa2a20873a01a5148bcdc3 /include/llvm/Target
parent4fc7355a21e1fa838406e15459aaf54a58fcf909 (diff)
downloadllvm-19262ee0725a09b7c621a3d2eb66ba1513ae932a.tar.gz
llvm-19262ee0725a09b7c621a3d2eb66ba1513ae932a.tar.bz2
llvm-19262ee0725a09b7c621a3d2eb66ba1513ae932a.tar.xz
[SystemZ] Use SRST to implement strlen and strnlen
It would also make sense to use it for memchr; I'm working on that now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetLibraryInfo.h2
-rw-r--r--include/llvm/Target/TargetSelectionDAGInfo.h13
2 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h
index 7a06415f4b..50b16a355d 100644
--- a/include/llvm/Target/TargetLibraryInfo.h
+++ b/include/llvm/Target/TargetLibraryInfo.h
@@ -700,7 +700,7 @@ public:
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::strcpy:
- case LibFunc::stpcpy:
+ case LibFunc::stpcpy: case LibFunc::strlen: case LibFunc::strnlen:
return true;
}
return false;
diff --git a/include/llvm/Target/TargetSelectionDAGInfo.h b/include/llvm/Target/TargetSelectionDAGInfo.h
index 5e65c304a1..138ff48196 100644
--- a/include/llvm/Target/TargetSelectionDAGInfo.h
+++ b/include/llvm/Target/TargetSelectionDAGInfo.h
@@ -137,6 +137,19 @@ public:
MachinePointerInfo Op2PtrInfo) const {
return std::make_pair(SDValue(), SDValue());
}
+
+ virtual std::pair<SDValue, SDValue>
+ EmitTargetCodeForStrlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
+ SDValue Src, MachinePointerInfo SrcPtrInfo) const {
+ return std::make_pair(SDValue(), SDValue());
+ }
+
+ virtual std::pair<SDValue, SDValue>
+ EmitTargetCodeForStrnlen(SelectionDAG &DAG, SDLoc DL, SDValue Chain,
+ SDValue Src, SDValue MaxLength,
+ MachinePointerInfo SrcPtrInfo) const {
+ return std::make_pair(SDValue(), SDValue());
+ }
};
} // end llvm namespace