File indexing completed on 2026-05-10 08:44:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef LLVM_TRANSFORMS_UTILS_LOWERMEMINTRINSICS_H
0015 #define LLVM_TRANSFORMS_UTILS_LOWERMEMINTRINSICS_H
0016
0017 #include <cstdint>
0018 #include <optional>
0019
0020 namespace llvm {
0021
0022 class AtomicMemCpyInst;
0023 class ConstantInt;
0024 class Instruction;
0025 class MemCpyInst;
0026 class MemMoveInst;
0027 class MemSetInst;
0028 class MemSetPatternInst;
0029 class ScalarEvolution;
0030 class TargetTransformInfo;
0031 class Value;
0032 struct Align;
0033
0034
0035
0036 void createMemCpyLoopUnknownSize(
0037 Instruction *InsertBefore, Value *SrcAddr, Value *DstAddr, Value *CopyLen,
0038 Align SrcAlign, Align DestAlign, bool SrcIsVolatile, bool DstIsVolatile,
0039 bool CanOverlap, const TargetTransformInfo &TTI,
0040 std::optional<unsigned> AtomicSize = std::nullopt);
0041
0042
0043
0044 void createMemCpyLoopKnownSize(
0045 Instruction *InsertBefore, Value *SrcAddr, Value *DstAddr,
0046 ConstantInt *CopyLen, Align SrcAlign, Align DestAlign, bool SrcIsVolatile,
0047 bool DstIsVolatile, bool CanOverlap, const TargetTransformInfo &TTI,
0048 std::optional<uint32_t> AtomicCpySize = std::nullopt);
0049
0050
0051 void expandMemCpyAsLoop(MemCpyInst *MemCpy, const TargetTransformInfo &TTI,
0052 ScalarEvolution *SE = nullptr);
0053
0054
0055
0056 bool expandMemMoveAsLoop(MemMoveInst *MemMove, const TargetTransformInfo &TTI);
0057
0058
0059 void expandMemSetAsLoop(MemSetInst *MemSet);
0060
0061
0062 void expandMemSetPatternAsLoop(MemSetPatternInst *MemSet);
0063
0064
0065 void expandAtomicMemCpyAsLoop(AtomicMemCpyInst *AtomicMemCpy,
0066 const TargetTransformInfo &TTI,
0067 ScalarEvolution *SE);
0068
0069 }
0070
0071 #endif