LLVM 22.0.0git
WholeProgramDevirt.h File Reference
#include "llvm/ADT/DenseSet.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/Compiler.h"
#include <cassert>
#include <cstdint>
#include <map>
#include <set>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  llvm::wholeprogramdevirt::AccumBitVector
struct  llvm::wholeprogramdevirt::VTableBits
struct  llvm::wholeprogramdevirt::TypeMemberInfo
struct  llvm::wholeprogramdevirt::VirtualCallTarget
struct  llvm::WholeProgramDevirtPass
struct  llvm::VTableSlotSummary

Namespaces

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

Functions

LLVM_ABI uint64_t llvm::wholeprogramdevirt::findLowestOffset (ArrayRef< VirtualCallTarget > Targets, bool IsAfter, uint64_t Size)
LLVM_ABI void llvm::wholeprogramdevirt::setBeforeReturnValues (MutableArrayRef< VirtualCallTarget > Targets, uint64_t AllocBefore, unsigned BitWidth, int64_t &OffsetByte, uint64_t &OffsetBit)
LLVM_ABI void llvm::wholeprogramdevirt::setAfterReturnValues (MutableArrayRef< VirtualCallTarget > Targets, uint64_t AllocAfter, unsigned BitWidth, int64_t &OffsetByte, uint64_t &OffsetBit)
LLVM_ABI bool llvm::hasWholeProgramVisibility (bool WholeProgramVisibilityEnabledInLTO)
LLVM_ABI void llvm::updatePublicTypeTestCalls (Module &M, bool WholeProgramVisibilityEnabledInLTO)
LLVM_ABI void llvm::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 definitions to linkage unit visibility in Module IR (for regular or hybrid LTO).
LLVM_ABI void llvm::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 definition summaries to linkage unit visibility in Module summary index (for ThinLTO).
LLVM_ABI void llvm::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 llvm::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.
LLVM_ABI void llvm::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 locals that were exported.