llvm/llvm/lib/Transforms/Utils/MemoryTaggingSupport.cpp

//== MemoryTaggingSupport.cpp - helpers for memory tagging implementations ===//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file declares common infrastructure for HWAddressSanitizer and
// Aarch64StackTagging.
//
//===----------------------------------------------------------------------===//

#include "llvm/Transforms/Utils/MemoryTaggingSupport.h"

#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/StackSafetyAnalysis.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Utils/PromoteMemToReg.h"

namespace llvm {
namespace memtag {
namespace {
bool maybeReachableFromEachOther(const SmallVectorImpl<IntrinsicInst *> &Insts,
                                 const DominatorTree *DT, const LoopInfo *LI,
                                 size_t MaxLifetimes) {}
} // namespace

bool forAllReachableExits(const DominatorTree &DT, const PostDominatorTree &PDT,
                          const LoopInfo &LI, const Instruction *Start,
                          const SmallVectorImpl<IntrinsicInst *> &Ends,
                          const SmallVectorImpl<Instruction *> &RetVec,
                          llvm::function_ref<void(Instruction *)> Callback) {}

bool isStandardLifetime(const SmallVectorImpl<IntrinsicInst *> &LifetimeStart,
                        const SmallVectorImpl<IntrinsicInst *> &LifetimeEnd,
                        const DominatorTree *DT, const LoopInfo *LI,
                        size_t MaxLifetimes) {}

Instruction *getUntagLocationIfFunctionExit(Instruction &Inst) {}

void StackInfoBuilder::visit(OptimizationRemarkEmitter &ORE,
                             Instruction &Inst) {}

AllocaInterestingness
StackInfoBuilder::getAllocaInterestingness(const AllocaInst &AI) {}

uint64_t getAllocaSizeInBytes(const AllocaInst &AI) {}

void alignAndPadAlloca(memtag::AllocaInfo &Info, llvm::Align Alignment) {}

bool isLifetimeIntrinsic(Value *V) {}

Value *readRegister(IRBuilder<> &IRB, StringRef Name) {}

Value *getPC(const Triple &TargetTriple, IRBuilder<> &IRB) {}

Value *getFP(IRBuilder<> &IRB) {}

Value *getAndroidSlotPtr(IRBuilder<> &IRB, int Slot) {}

static DbgAssignIntrinsic *DynCastToDbgAssign(DbgVariableIntrinsic *DVI) {}

static DbgVariableRecord *DynCastToDbgAssign(DbgVariableRecord *DVR) {}

void annotateDebugRecords(AllocaInfo &Info, unsigned int Tag) {}

} // namespace memtag
} // namespace llvm