diff options
author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-16 11:41:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-08-16 11:41:43 +0000 |
commit | 19262ee0725a09b7c621a3d2eb66ba1513ae932a (patch) | |
tree | 848fa9a49ad86171c7aa2a20873a01a5148bcdc3 /include | |
parent | 4fc7355a21e1fa838406e15459aaf54a58fcf909 (diff) | |
download | external_llvm-19262ee0725a09b7c621a3d2eb66ba1513ae932a.zip external_llvm-19262ee0725a09b7c621a3d2eb66ba1513ae932a.tar.gz external_llvm-19262ee0725a09b7c621a3d2eb66ba1513ae932a.tar.bz2 |
[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')
-rw-r--r-- | include/llvm/Target/TargetLibraryInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetSelectionDAGInfo.h | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetLibraryInfo.h b/include/llvm/Target/TargetLibraryInfo.h index 7a06415..50b16a3 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 5e65c30..138ff48 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 |