LLVM 20.0.0git
|
A derived class of LLVMContext that initializes itself according to a given Config object. More...
#include "llvm/LTO/Config.h"
Public Member Functions | |
LTOLLVMContext (const Config &C) | |
Public Member Functions inherited from llvm::LLVMContext | |
LLVMContext () | |
LLVMContext (const LLVMContext &)=delete | |
LLVMContext & | operator= (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. | |
std::optional< StringRef > | getSyncScopeName (SyncScope::ID Id) const |
getSyncScopeName - Returns the name of a SyncScope::ID registered with LLVMContext, if any. | |
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 () |
unsigned | generateMachineFunctionNum (Function &) |
generateMachineFunctionNum - Get a unique number for MachineFunction that associated with the given Function. | |
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 DiagnosticHandler * | getDiagHandlerPtr () const |
getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler. | |
std::unique_ptr< DiagnosticHandler > | getDiagnosticHandler () |
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::RemarkStreamer * | getMainRemarkStreamer () |
The "main remark streamer" used by all the specialized remark streamers. | |
const remarks::RemarkStreamer * | getMainRemarkStreamer () const |
void | setMainRemarkStreamer (std::unique_ptr< remarks::RemarkStreamer > MainRemarkStreamer) |
LLVMRemarkStreamer * | getLLVMRemarkStreamer () |
The "LLVM remark streamer" used by LLVM to serialize remark diagnostics comming from IR and MIR passes. | |
const LLVMRemarkStreamer * | getLLVMRemarkStreamer () 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 (const Instruction *I, const Twine &ErrorStr) |
emitError - Emit an error message to the currently installed error handler with optional location information. | |
void | emitError (const Twine &ErrorStr) |
OptPassGate & | getOptPassGate () 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. | |
StringRef | getDefaultTargetCPU () |
Get or set the current "default" target CPU (target-cpu function attribute). | |
void | setDefaultTargetCPU (StringRef CPU) |
StringRef | getDefaultTargetFeatures () |
Similar to {get,set}DefaultTargetCPU() but for default target-features. | |
void | setDefaultTargetFeatures (StringRef Features) |
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 char * | getDiagnosticMessagePrefix (DiagnosticSeverity Severity) |
Get the prefix that should be printed in front of a diagnostic of the given Severity . | |
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 301 of file Config.h.
References llvm::CallingConv::C, DiagHandler, llvm::LLVMContext::enableDebugTypeODRUniquing(), llvm::LLVMContext::setDiagnosticHandler(), and llvm::LLVMContext::setDiscardValueNames().
DiagnosticHandlerFunction llvm::lto::LTOLLVMContext::DiagHandler |
Definition at line 307 of file Config.h.
Referenced by LTOLLVMContext().