#ifndef LLVM_TRANSFORMS_UTILS_LOWERMEMINTRINSICS_H
#define LLVM_TRANSFORMS_UTILS_LOWERMEMINTRINSICS_H
#include "llvm/ADT/Optional.h"
namespace llvm {
class AtomicMemCpyInst;
class ConstantInt;
class Instruction;
class MemCpyInst;
class MemMoveInst;
class MemSetInst;
class ScalarEvolution;
class TargetTransformInfo;
class Value;
struct Align;
void createMemCpyLoopUnknownSize(Instruction *InsertBefore, Value *SrcAddr,
Value *DstAddr, Value *CopyLen, Align SrcAlign,
Align DestAlign, bool SrcIsVolatile,
bool DstIsVolatile, bool CanOverlap,
const TargetTransformInfo &TTI,
Optional<unsigned> AtomicSize = None);
void createMemCpyLoopKnownSize(Instruction *InsertBefore, Value *SrcAddr,
Value *DstAddr, ConstantInt *CopyLen,
Align SrcAlign, Align DestAlign,
bool SrcIsVolatile, bool DstIsVolatile,
bool CanOverlap, const TargetTransformInfo &TTI,
Optional<uint32_t> AtomicCpySize = None);
void expandMemCpyAsLoop(MemCpyInst *MemCpy, const TargetTransformInfo &TTI,
ScalarEvolution *SE = nullptr);
void expandMemMoveAsLoop(MemMoveInst *MemMove);
void expandMemSetAsLoop(MemSetInst *MemSet);
void expandAtomicMemCpyAsLoop(AtomicMemCpyInst *AtomicMemCpy,
const TargetTransformInfo &TTI,
ScalarEvolution *SE);
}
#endif