14#ifndef LLVM_TRANSFORMS_IPO_WHOLEPROGRAMDEVIRT_H 
   15#define LLVM_TRANSFORMS_IPO_WHOLEPROGRAMDEVIRT_H 
   60    for (
unsigned I = 0; 
I != 
Size; ++
I) {
 
   61      DataUsed.first[
I] = Val >> (
I * 8);
 
   63      DataUsed.second[
I] = 0xff;
 
 
   72    for (
unsigned I = 0; 
I != 
Size; ++
I) {
 
   73      DataUsed.first[
Size - 
I - 1] = Val >> (
I * 8);
 
   75      DataUsed.second[
Size - 
I - 1] = 0xff;
 
 
   83      *DataUsed.first |= 1 << (Pos % 8);
 
   84    assert(!(*DataUsed.second & (1 << Pos % 8)));
 
   85    *DataUsed.second |= 1 << (Pos % 8);
 
 
 
  214                                    int64_t &OffsetByte, 
uint64_t &OffsetBit);
 
  221                                   int64_t &OffsetByte, 
uint64_t &OffsetBit);
 
 
  248    Module &M, 
bool WholeProgramVisibilityEnabledInLTO,
 
  250    bool ValidateAllVtablesHaveTypeInfos,
 
  271    std::map<
ValueInfo, std::vector<VTableSlotSummary>> &LocalWPDTargetsMap);
 
  278    std::map<
ValueInfo, std::vector<VTableSlotSummary>> &LocalWPDTargetsMap);
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
 
This file defines the DenseSet and SmallDenseSet classes.
 
This header defines various interfaces for pass management in LLVM.
 
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
 
Implements a dense probed hash-table based set.
 
Class to hold module path string table and global value map, and encapsulate methods for operating on...
 
A Module instance is used to store all the information related to an LLVM module.
 
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
 
A set of analyses that are preserved following a run of a transformation pass.
 
StringRef - Represent a constant reference to a string, i.e.
 
An efficient, type-erasing, non-owning reference to a callable.
 
LLVM_ABI uint64_t findLowestOffset(ArrayRef< VirtualCallTarget > Targets, bool IsAfter, uint64_t Size)
 
LLVM_ABI void setAfterReturnValues(MutableArrayRef< VirtualCallTarget > Targets, uint64_t AllocAfter, unsigned BitWidth, int64_t &OffsetByte, uint64_t &OffsetBit)
 
LLVM_ABI void setBeforeReturnValues(MutableArrayRef< VirtualCallTarget > Targets, uint64_t AllocBefore, unsigned BitWidth, int64_t &OffsetByte, uint64_t &OffsetBit)
 
This is an optimization pass for GlobalISel generic memory operations.
 
LLVM_ABI bool hasWholeProgramVisibility(bool WholeProgramVisibilityEnabledInLTO)
 
LLVM_ABI void updatePublicTypeTestCalls(Module &M, bool WholeProgramVisibilityEnabledInLTO)
 
LLVM_ABI void getVisibleToRegularObjVtableGUIDs(ModuleSummaryIndex &Index, DenseSet< GlobalValue::GUID > &VisibleToRegularObjSymbols, function_ref< bool(StringRef)> IsVisibleToRegularObj)
Based on typeID string, get all associated vtable GUIDS that are visible to regular objects.
 
LLVM_ABI void updateIndexWPDForExports(ModuleSummaryIndex &Summary, function_ref< bool(StringRef, ValueInfo)> isExported, std::map< ValueInfo, std::vector< VTableSlotSummary > > &LocalWPDTargetsMap)
Call after cross-module importing to update the recorded single impl devirt target names for any loca...
 
LLVM_ABI void runWholeProgramDevirtOnIndex(ModuleSummaryIndex &Summary, std::set< GlobalValue::GUID > &ExportedGUIDs, std::map< ValueInfo, std::vector< VTableSlotSummary > > &LocalWPDTargetsMap)
Perform index-based whole program devirtualization on the Summary index.
 
constexpr unsigned BitWidth
 
LLVM_ABI void updateVCallVisibilityInModule(Module &M, bool WholeProgramVisibilityEnabledInLTO, const DenseSet< GlobalValue::GUID > &DynamicExportSymbols, bool ValidateAllVtablesHaveTypeInfos, function_ref< bool(StringRef)> IsVisibleToRegularObj)
If whole program visibility asserted, then upgrade all public vcall visibility metadata on vtable def...
 
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
 
LLVM_ABI void updateVCallVisibilityInIndex(ModuleSummaryIndex &Index, bool WholeProgramVisibilityEnabledInLTO, const DenseSet< GlobalValue::GUID > &DynamicExportSymbols, const DenseSet< GlobalValue::GUID > &VisibleToRegularObjSymbols)
If whole program visibility asserted, then upgrade all public vcall visibility metadata on vtable def...
 
A CRTP mix-in to automatically provide informational APIs needed for passes.
 
Struct that holds a reference to a particular GUID in a global value summary.
 
WholeProgramDevirtPass(ModuleSummaryIndex *ExportSummary, const ModuleSummaryIndex *ImportSummary)
 
const ModuleSummaryIndex * ImportSummary
 
ModuleSummaryIndex * ExportSummary
 
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
 
void setBit(uint64_t Pos, bool b)
 
void setBE(uint64_t Pos, uint64_t Val, uint8_t Size)
 
void setLE(uint64_t Pos, uint64_t Val, uint8_t Size)
 
std::vector< uint8_t > Bytes
 
std::pair< uint8_t *, uint8_t * > getPtrToData(uint64_t Pos, uint8_t Size)
 
std::vector< uint8_t > BytesUsed
 
bool operator<(const TypeMemberInfo &other) const
 
uint64_t allocatedAfterBytes() const
 
VirtualCallTarget(const TypeMemberInfo *TM, bool IsBigEndian)
 
LLVM_ABI VirtualCallTarget(GlobalValue *Fn, const TypeMemberInfo *TM)
 
void setBeforeBit(uint64_t Pos)
 
void setBeforeBytes(uint64_t Pos, uint8_t Size)
 
void setAfterBit(uint64_t Pos)
 
uint64_t allocatedBeforeBytes() const
 
uint64_t minBeforeBytes() const
 
void setAfterBytes(uint64_t Pos, uint8_t Size)
 
uint64_t minAfterBytes() const
 
const TypeMemberInfo * TM