diff options
author | Serge Pavlov <sepavloff@gmail.com> | 2013-09-17 16:24:42 +0000 |
---|---|---|
committer | Serge Pavlov <sepavloff@gmail.com> | 2013-09-17 16:24:42 +0000 |
commit | 496f02481dd9abdee85c61d88f07963ea27b9e38 (patch) | |
tree | 569ba9f97b02a9956913fb4ed61136139adbcf62 /lib | |
parent | 215585920ff264a46cd41a7c5b4aeb8ce17daa90 (diff) | |
download | llvm-496f02481dd9abdee85c61d88f07963ea27b9e38.tar.gz llvm-496f02481dd9abdee85c61d88f07963ea27b9e38.tar.bz2 llvm-496f02481dd9abdee85c61d88f07963ea27b9e38.tar.xz |
Added documentation to getMemsetStores.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 845b9a3222..3ca1b4f44c 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3811,6 +3811,24 @@ static SDValue getMemmoveLoadsAndStores(SelectionDAG &DAG, SDLoc dl, &OutChains[0], OutChains.size()); } +/// \brief Lower the call to 'memset' intrinsic function into a series of store +/// operations. +/// +/// \param DAG Selection DAG where lowered code is placed. +/// \param dl Link to corresponding IR location. +/// \param Chain Control flow dependency. +/// \param Dst Pointer to destination memory location. +/// \param Src Value of byte to write into the memory. +/// \param Size Number of bytes to write. +/// \param Align Alignment of the destination in bytes. +/// \param isVol True if destination is volatile. +/// \param DstPtrInfo IR information on the memory pointer. +/// \returns New head in the control flow, if lowering was successful, empty +/// SDValue otherwise. +/// +/// The function tries to replace 'llvm.memset' intrinsic with several store +/// operations and value calculation code. This is usually profitable for small +/// memory size. static SDValue getMemsetStores(SelectionDAG &DAG, SDLoc dl, SDValue Chain, SDValue Dst, SDValue Src, uint64_t Size, |