LLVM 20.0.0git
Classes | Namespaces | Enumerations | Functions
TypeMetadataUtils.h File Reference
#include <cstdint>
#include <utility>

Go to the source code of this file.

Classes

struct  llvm::DevirtCallSite
 A call site that could be devirtualized. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Enumerations

enum  llvm::CfiFunctionLinkage { llvm::CFL_Definition = 0 , llvm::CFL_Declaration = 1 , llvm::CFL_WeakDeclaration = 2 }
 The type of CFI jumptable needed for a function. More...
 

Functions

void llvm::findDevirtualizableCallsForTypeTest (SmallVectorImpl< DevirtCallSite > &DevirtCalls, SmallVectorImpl< CallInst * > &Assumes, const CallInst *CI, DominatorTree &DT)
 Given a call to the intrinsic @llvm.type.test, find all devirtualizable call sites based on the call and return them in DevirtCalls.
 
void llvm::findDevirtualizableCallsForTypeCheckedLoad (SmallVectorImpl< DevirtCallSite > &DevirtCalls, SmallVectorImpl< Instruction * > &LoadedPtrs, SmallVectorImpl< Instruction * > &Preds, bool &HasNonCallUses, const CallInst *CI, DominatorTree &DT)
 Given a call to the intrinsic @llvm.type.checked.load, find all devirtualizable call sites based on the call and return them in DevirtCalls.
 
Constantllvm::getPointerAtOffset (Constant *I, uint64_t Offset, Module &M, Constant *TopLevelGlobal=nullptr)
 Processes a Constant recursively looking into elements of arrays, structs and expressions to find a trivial pointer element that is located at the given offset (relative to the beginning of the whole outer Constant).
 
std::pair< Function *, Constant * > llvm::getFunctionAtVTableOffset (GlobalVariable *GV, uint64_t Offset, Module &M)
 Given a vtable and a specified offset, returns the function and the trivial pointer at the specified offset in pair iff the pointer at the specified offset is a function or an alias to a function.
 
void llvm::replaceRelativePointerUsersWithZero (Constant *C)
 Finds the same "relative pointer" pattern as described above, where the target is C, and replaces the entire pattern with a constant zero.