LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::lto::LTOLLVMContext Struct Reference

A derived class of LLVMContext that initializes itself according to a given Config object. More...

#include "llvm/LTO/Config.h"

Inheritance diagram for llvm::lto::LTOLLVMContext:
Inheritance graph
[legend]

Public Member Functions

 LTOLLVMContext (const Config &C)
 
- Public Member Functions inherited from llvm::LLVMContext
 LLVMContext ()
 
 LLVMContext (const LLVMContext &)=delete
 
LLVMContextoperator= (const LLVMContext &)=delete
 
 ~LLVMContext ()
 
unsigned getMDKindID (StringRef Name) const
 getMDKindID - Return a unique non-zero ID for the specified metadata kind.
 
void getMDKindNames (SmallVectorImpl< StringRef > &Result) const
 getMDKindNames - Populate client supplied SmallVector with the name for custom metadata IDs registered in this LLVMContext.
 
void getOperandBundleTags (SmallVectorImpl< StringRef > &Result) const
 getOperandBundleTags - Populate client supplied SmallVector with the bundle tags registered in this LLVMContext.
 
StringMapEntry< uint32_t > * getOrInsertBundleTag (StringRef TagName) const
 getOrInsertBundleTag - Returns the Tag to use for an operand bundle of name TagName.
 
uint32_t getOperandBundleTagID (StringRef Tag) const
 getOperandBundleTagID - Maps a bundle tag to an integer ID.
 
SyncScope::ID getOrInsertSyncScopeID (StringRef SSN)
 getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
 
void getSyncScopeNames (SmallVectorImpl< StringRef > &SSNs) const
 getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered with LLVMContext.
 
void setGC (const Function &Fn, std::string GCName)
 Define the GC for a function.
 
const std::string & getGC (const Function &Fn)
 Return the GC for a function.
 
void deleteGC (const Function &Fn)
 Remove the GC for a function.
 
bool shouldDiscardValueNames () const
 Return true if the Context runtime configuration is set to discard all value names.
 
void setDiscardValueNames (bool Discard)
 Set the Context runtime configuration to discard all value name (but GlobalValue).
 
bool isODRUniquingDebugTypes () const
 Whether there is a string map for uniquing debug info identifiers across the context.
 
void enableDebugTypeODRUniquing ()
 
void disableDebugTypeODRUniquing ()
 
void setDiagnosticHandlerCallBack (DiagnosticHandler::DiagnosticHandlerTy DiagHandler, void *DiagContext=nullptr, bool RespectFilters=false)
 setDiagnosticHandlerCallBack - This method sets a handler call back that is invoked when the backend needs to report anything to the user.
 
void setDiagnosticHandler (std::unique_ptr< DiagnosticHandler > &&DH, bool RespectFilters=false)
 setDiagnosticHandler - This method sets unique_ptr to object of DiagnosticHandler to provide custom diagnostic handling.
 
DiagnosticHandler::DiagnosticHandlerTy getDiagnosticHandlerCallBack () const
 getDiagnosticHandlerCallBack - Return the diagnostic handler call back set by setDiagnosticHandlerCallBack.
 
void * getDiagnosticContext () const
 getDiagnosticContext - Return the diagnostic context set by setDiagnosticContext.
 
const DiagnosticHandlergetDiagHandlerPtr () const
 getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler.
 
std::unique_ptr< DiagnosticHandlergetDiagnosticHandler ()
 getDiagnosticHandler - transfers ownership of DiagnosticHandler unique_ptr to caller.
 
bool getDiagnosticsHotnessRequested () const
 Return if a code hotness metric should be included in optimization diagnostics.
 
void setDiagnosticsHotnessRequested (bool Requested)
 Set if a code hotness metric should be included in optimization diagnostics.
 
bool getMisExpectWarningRequested () const
 
void setMisExpectWarningRequested (bool Requested)
 
void setDiagnosticsMisExpectTolerance (std::optional< uint32_t > Tolerance)
 
uint32_t getDiagnosticsMisExpectTolerance () const
 
uint64_t getDiagnosticsHotnessThreshold () const
 Return the minimum hotness value a diagnostic would need in order to be included in optimization diagnostics.
 
void setDiagnosticsHotnessThreshold (std::optional< uint64_t > Threshold)
 Set the minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
 
bool isDiagnosticsHotnessThresholdSetFromPSI () const
 Return if hotness threshold is requested from PSI.
 
remarks::RemarkStreamergetMainRemarkStreamer ()
 The "main remark streamer" used by all the specialized remark streamers.
 
const remarks::RemarkStreamergetMainRemarkStreamer () const
 
void setMainRemarkStreamer (std::unique_ptr< remarks::RemarkStreamer > MainRemarkStreamer)
 
LLVMRemarkStreamergetLLVMRemarkStreamer ()
 The "LLVM remark streamer" used by LLVM to serialize remark diagnostics comming from IR and MIR passes.
 
const LLVMRemarkStreamergetLLVMRemarkStreamer () const
 
void setLLVMRemarkStreamer (std::unique_ptr< LLVMRemarkStreamer > RemarkStreamer)
 
void diagnose (const DiagnosticInfo &DI)
 Report a message to the currently installed diagnostic handler.
 
void setYieldCallback (YieldCallbackTy Callback, void *OpaqueHandle)
 Registers a yield callback with the given context.
 
void yield ()
 Calls the yield callback (if applicable).
 
void emitError (uint64_t LocCookie, const Twine &ErrorStr)
 emitError - Emit an error message to the currently installed error handler with optional location information.
 
void emitError (const Instruction *I, const Twine &ErrorStr)
 
void emitError (const Twine &ErrorStr)
 
OptPassGategetOptPassGate () const
 Access the object which can disable optional passes and individual optimizations at compile time.
 
void setOptPassGate (OptPassGate &)
 Set the object which can disable optional passes and individual optimizations at compile time.
 
void setOpaquePointers (bool Enable) const
 Set whether opaque pointers are enabled.
 
bool supportsTypedPointers () const
 Whether typed pointers are supported. If false, all pointers are opaque.
 

Public Attributes

DiagnosticHandlerFunction DiagHandler
 
- Public Attributes inherited from llvm::LLVMContext
LLVMContextImpl *const pImpl
 

Additional Inherited Members

- Public Types inherited from llvm::LLVMContext
enum  : unsigned
 
enum  : unsigned {
  OB_deopt = 0 , OB_funclet = 1 , OB_gc_transition = 2 , OB_cfguardtarget = 3 ,
  OB_preallocated = 4 , OB_gc_live = 5 , OB_clang_arc_attachedcall = 6 , OB_ptrauth = 7 ,
  OB_kcfi = 8 , OB_convergencectrl = 9
}
 Known operand bundle tag IDs, which always have the same value. More...
 
using YieldCallbackTy = void(*)(LLVMContext *Context, void *OpaqueHandle)
 Defines the type of a yield callback.
 
- Static Public Member Functions inherited from llvm::LLVMContext
static const chargetDiagnosticMessagePrefix (DiagnosticSeverity Severity)
 Get the prefix that should be printed in front of a diagnostic of the given Severity.
 

Detailed 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).

Definition at line 294 of file Config.h.

Constructor & Destructor Documentation

◆ LTOLLVMContext()

llvm::lto::LTOLLVMContext::LTOLLVMContext ( const Config C)
inline

Member Data Documentation

◆ DiagHandler

DiagnosticHandlerFunction llvm::lto::LTOLLVMContext::DiagHandler

Definition at line 302 of file Config.h.

Referenced by LTOLLVMContext().


The documentation for this struct was generated from the following file: