llvm::lto::LTOLLVMContext

LLVMContext initialized from an LTO Config.

Synopsis

Declared in <llvm/LTO/Config.h>

struct LTOLLVMContext
    : LLVMContext

Description

A derived class of LLVMContext that initializes itself according to a given Config object. The purpose of this class is to tie ownership of the diagnostic handler to the context, as opposed to the Config object (which may be ephemeral).

Base Classes

NameDescription
LLVMContextThis is an important class for using LLVM in a threaded context. It (opaquely) owns and manages the core "global" data of LLVM's core infrastructure, including the type and constant uniquing tables. LLVMContext itself provides no locking guarantees, so you should be careful to have one context per thread.

Type Aliases

NameDescription
YieldCallbackTy Defines the type of a yield callback.

Enums

NameDescription
Unnamed enum Fixed metadata kind IDs that are always available in every context.

Member Functions

NameDescription
LTOLLVMContext [constructor]Construct a context configured from C.
operator= [deleted]Copy assignment is deleted; LLVMContext is non-copyable.
deleteGC Remove the GC for a function.
diagnose Report a message to the currently installed diagnostic handler.
disableDebugTypeODRUniquing Disable ODR-based uniquing of debug type identifiers in this context.
emitError emitError overloads
enableDebugTypeODRUniquing Enable ODR-based uniquing of debug type identifiers in this context.
generateMachineFunctionNum Get a unique number for a MachineFunction associated with F.
getDefaultTargetCPU Get the current default target CPU (target-cpu function attribute).
getDefaultTargetFeatures Similar to {get,set}DefaultTargetCPU() but for default target-features.
getDiagHandlerPtr getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler.
getDiagnosticContext getDiagnosticContext - Return the diagnostic context set by setDiagnosticContext.
getDiagnosticHandler getDiagnosticHandler - transfers ownership of DiagnosticHandler unique_ptr to caller.
getDiagnosticHandlerCallBack getDiagnosticHandlerCallBack - Return the diagnostic handler call back set by setDiagnosticHandlerCallBack.
getDiagnosticsHotnessRequested Return if a code hotness metric should be included in optimization diagnostics.
getDiagnosticsHotnessThreshold Return the minimum hotness value a diagnostic would need in order to be included in optimization diagnostics.
getDiagnosticsMisExpectTolerance Return the tolerance used when diagnosing misexpect warnings.
getGC Return the GC for a function.
getLLVMRemarkStreamer getLLVMRemarkStreamer overloads
getMDKindID Return a unique non-zero ID for the specified metadata kind.
getMDKindNames Populate Result with the names of custom metadata IDs in this context.
getMainRemarkStreamer getMainRemarkStreamer overloads
getMisExpectWarningRequested Return whether misexpect (branch-weight mismatch) warnings are enabled.
getOperandBundleTagID Map a bundle tag name to its integer ID.
getOperandBundleTags Populate Result with the operand bundle tags registered in this context.
getOptPassGate Access the object which can disable optional passes and individual optimizations at compile time.
getOrInsertBundleTag Return the tag entry to use for an operand bundle named TagName.
getOrInsertSyncScopeID Map a synchronization scope name to its synchronization scope ID.
getSyncScopeName Return the name of a SyncScope::ID registered with LLVMContext, if any.
getSyncScopeNames Populate SSNs with synchronization scope names registered in this context.
incNextDILocationAtomGroup Key Instructions: get the next free atom group number and increment the global tracker.
isDiagnosticsHotnessThresholdSetFromPSI Return if hotness threshold is requested from PSI.
isODRUniquingDebugTypes Whether there is a string map for uniquing debug info identifiers across the context. Off by default.
setDefaultTargetCPU Set the current default target CPU (target-cpu function attribute).
setDefaultTargetFeatures Set the default target-features string for newly created functions.
setDiagnosticHandler Install a DiagnosticHandler object for custom diagnostic handling.
setDiagnosticHandlerCallBack Set a diagnostic handler callback invoked when the backend reports to the user.
setDiagnosticsHotnessRequested Set if a code hotness metric should be included in optimization diagnostics.
setDiagnosticsHotnessThreshold Set the minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
setDiagnosticsMisExpectTolerance Set the tolerance used when diagnosing misexpect warnings.
setDiscardValueNames Configure whether non-GlobalValue value names are discarded.
setGC Define the GC for a function.
setLLVMRemarkStreamer Set the LLVM remark streamer used to serialize IR/MIR remark diagnostics.
setMainRemarkStreamer Set the main remark streamer used by specialized remark streamers.
setMisExpectWarningRequested Enable or disable misexpect (branch-weight mismatch) warnings.
setOptPassGate Set the object which can disable optional passes and individual optimizations at compile time.
setYieldCallback Registers a yield callback with the given context.
shouldDiscardValueNames Return true if the Context runtime configuration is set to discard all value names. When true, only GlobalValue names will be available in the IR.
updateDILocationAtomGroupWaterline Key Instructions: update the highest number atom group emitted for any function.
yield Calls the yield callback (if applicable).

Static Member Functions

NameDescription
getDiagnosticMessagePrefix Get the prefix that should be printed in front of a diagnostic of the given Severity

Data Members

NameDescription
DiagHandler Diagnostic handler owned by this context.
pImpl Pointer to the private implementation of this context.

Non-Member Functions

NameDescription
setupLLVMOptimizationRemarksSetup optimization remarks.
::llvm::createDevelopmentModeAdvisorProviderCreate a development-mode ML eviction advisor provider.
::llvm::createDevelopmentModePriorityAdvisorProviderCreate a development-mode ML priority advisor provider.
::llvm::createReleaseModeAdvisorProviderCreate a release-mode ML eviction advisor provider.
::llvm::createReleaseModeModelRunnerConstruct the appropriate MLModelRunner for release mode.
::llvm::errorToErrorCodeAndEmitErrorsConvert Err to an error_code and emit diagnostics into Ctx.
::llvm::expectedToErrorOrAndEmitErrorsConvert Val to ErrorOr, emitting diagnostics into Ctx on failure.
::llvm::finalizeLLVMOptimizationRemarksFinalize optimization remarks and deregister the RemarkStreamer from the Context.
::llvm::getTensorSpecFromJSONConstruct a TensorSpec from a JSON dictionary describing the tensor.
::llvm::makePostTransformationMetadataCreate a new LoopID after the loop has been transformed.
::llvm::setupLLVMOptimizationRemarksSet up optimization remarks that output directly to a raw_ostream.
::llvm::setupLLVMOptimizationRemarksSet up optimization remarks that output to a file.
::llvm::wrapWrap an array of LLVMContext pointers for the C API.
::llvm::wrapWrap a LLVMContext pointer as an opaque C API reference.
::llvm::Intrinsic::getAttributesReturn the attributes for an intrinsic.
::llvm::Intrinsic::getFnAttributesReturn the function attributes for an intrinsic.
::llvm::Intrinsic::getTypeReturn the function type for an intrinsic.