#include "llvm/Transforms/Utils/MemoryOpRemark.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include <optional>
usingnamespacellvm;
usingnamespacellvm::ore;
MemoryOpRemark::~MemoryOpRemark() = default;
bool MemoryOpRemark::canHandle(const Instruction *I, const TargetLibraryInfo &TLI) { … }
void MemoryOpRemark::visit(const Instruction *I) { … }
std::string MemoryOpRemark::explainSource(StringRef Type) const { … }
StringRef MemoryOpRemark::remarkName(RemarkKind RK) const { … }
static void inlineVolatileOrAtomicWithExtraArgs(bool *Inline, bool Volatile,
bool Atomic,
DiagnosticInfoIROptimization &R) { … }
static std::optional<uint64_t>
getSizeInBytes(std::optional<uint64_t> SizeInBits) { … }
template<typename ...Ts>
std::unique_ptr<DiagnosticInfoIROptimization>
MemoryOpRemark::makeRemark(Ts... Args) { … }
void MemoryOpRemark::visitStore(const StoreInst &SI) { … }
void MemoryOpRemark::visitUnknown(const Instruction &I) { … }
void MemoryOpRemark::visitIntrinsicCall(const IntrinsicInst &II) { … }
void MemoryOpRemark::visitCall(const CallInst &CI) { … }
template <typename FTy>
void MemoryOpRemark::visitCallee(FTy F, bool KnownLibCall,
DiagnosticInfoIROptimization &R) { … }
void MemoryOpRemark::visitKnownLibCall(const CallInst &CI, LibFunc LF,
DiagnosticInfoIROptimization &R) { … }
void MemoryOpRemark::visitSizeOperand(Value *V, DiagnosticInfoIROptimization &R) { … }
static std::optional<StringRef> nameOrNone(const Value *V) { … }
void MemoryOpRemark::visitVariable(const Value *V,
SmallVectorImpl<VariableInfo> &Result) { … }
void MemoryOpRemark::visitPtr(Value *Ptr, bool IsRead, DiagnosticInfoIROptimization &R) { … }
bool AutoInitRemark::canHandle(const Instruction *I) { … }
std::string AutoInitRemark::explainSource(StringRef Type) const { … }
StringRef AutoInitRemark::remarkName(RemarkKind RK) const { … }