LLVM: llvm::lto::LTOLLVMContext Struct Reference (original) (raw)

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

Public Member Functions

LTOLLVMContext (const Config &C)

Public Member Functions inherited from llvm::LLVMContext

LLVM_ABI

LLVMContext ()

LLVMContext (const LLVMContext &)=delete

LLVMContext &

operator= (const LLVMContext &)=delete

LLVM_ABI

~LLVMContext ()

LLVM_ABI unsigned

getMDKindID (StringRef Name) const

getMDKindID - Return a unique non-zero ID for the specified metadata kind.

LLVM_ABI void

getMDKindNames (SmallVectorImpl< StringRef > &Result) const

getMDKindNames - Populate client supplied SmallVector with the name for custom metadata IDs registered in this LLVMContext.

LLVM_ABI void

getOperandBundleTags (SmallVectorImpl< StringRef > &Result) const

getOperandBundleTags - Populate client supplied SmallVector with the bundle tags registered in this LLVMContext.

LLVM_ABI StringMapEntry< uint32_t > *

getOrInsertBundleTag (StringRef TagName) const

getOrInsertBundleTag - Returns the Tag to use for an operand bundle of name TagName.

LLVM_ABI uint32_t

getOperandBundleTagID (StringRef Tag) const

getOperandBundleTagID - Maps a bundle tag to an integer ID.

LLVM_ABI SyncScope::ID

getOrInsertSyncScopeID (StringRef SSN)

getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.

LLVM_ABI void

getSyncScopeNames (SmallVectorImpl< StringRef > &SSNs) const

getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered with LLVMContext.

LLVM_ABI std::optional< StringRef >

getSyncScopeName (SyncScope::ID Id) const

getSyncScopeName - Returns the name of a SyncScope::ID registered with LLVMContext, if any.

LLVM_ABI void

setGC (const Function &Fn, std::string GCName)

Define the GC for a function.

LLVM_ABI const std::string &

getGC (const Function &Fn)

Return the GC for a function.

LLVM_ABI void

deleteGC (const Function &Fn)

Remove the GC for a function.

LLVM_ABI bool

shouldDiscardValueNames () const

Return true if the Context runtime configuration is set to discard all value names.

LLVM_ABI void

setDiscardValueNames (bool Discard)

Set the Context runtime configuration to discard all value name (but GlobalValue).

LLVM_ABI bool

isODRUniquingDebugTypes () const

Whether there is a string map for uniquing debug info identifiers across the context.

LLVM_ABI void

enableDebugTypeODRUniquing ()

LLVM_ABI void

disableDebugTypeODRUniquing ()

LLVM_ABI unsigned

generateMachineFunctionNum (Function &)

generateMachineFunctionNum - Get a unique number for MachineFunction that associated with the given Function.

LLVM_ABI 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.

LLVM_ABI 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.

LLVM_ABI DiagnosticHandler::DiagnosticHandlerTy

getDiagnosticHandlerCallBack () const

getDiagnosticHandlerCallBack - Return the diagnostic handler call back set by setDiagnosticHandlerCallBack.

LLVM_ABI void *

getDiagnosticContext () const

getDiagnosticContext - Return the diagnostic context set by setDiagnosticContext.

LLVM_ABI const DiagnosticHandler *

getDiagHandlerPtr () const

getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler.

LLVM_ABI std::unique_ptr< DiagnosticHandler >

getDiagnosticHandler ()

getDiagnosticHandler - transfers ownership of DiagnosticHandler unique_ptr to caller.

LLVM_ABI bool

getDiagnosticsHotnessRequested () const

Return if a code hotness metric should be included in optimization diagnostics.

LLVM_ABI void

setDiagnosticsHotnessRequested (bool Requested)

Set if a code hotness metric should be included in optimization diagnostics.

LLVM_ABI bool

getMisExpectWarningRequested () const

LLVM_ABI void

setMisExpectWarningRequested (bool Requested)

LLVM_ABI void

setDiagnosticsMisExpectTolerance (std::optional< uint32_t > Tolerance)

LLVM_ABI uint32_t

getDiagnosticsMisExpectTolerance () const

LLVM_ABI uint64_t

getDiagnosticsHotnessThreshold () const

Return the minimum hotness value a diagnostic would need in order to be included in optimization diagnostics.

LLVM_ABI void

setDiagnosticsHotnessThreshold (std::optional< uint64_t > Threshold)

Set the minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.

LLVM_ABI bool

isDiagnosticsHotnessThresholdSetFromPSI () const

Return if hotness threshold is requested from PSI.

LLVM_ABI remarks::RemarkStreamer *

getMainRemarkStreamer ()

The "main remark streamer" used by all the specialized remark streamers.

LLVM_ABI const remarks::RemarkStreamer *

getMainRemarkStreamer () const

LLVM_ABI void

setMainRemarkStreamer (std::unique_ptr< remarks::RemarkStreamer > MainRemarkStreamer)

LLVM_ABI LLVMRemarkStreamer *

getLLVMRemarkStreamer ()

The "LLVM remark streamer" used by LLVM to serialize remark diagnostics comming from IR and MIR passes.

LLVM_ABI const LLVMRemarkStreamer *

getLLVMRemarkStreamer () const

LLVM_ABI void

setLLVMRemarkStreamer (std::unique_ptr< LLVMRemarkStreamer > RemarkStreamer)

LLVM_ABI void

diagnose (const DiagnosticInfo &DI)

Report a message to the currently installed diagnostic handler.

LLVM_ABI void

setYieldCallback (YieldCallbackTy Callback, void *OpaqueHandle)

Registers a yield callback with the given context.

LLVM_ABI void

yield ()

Calls the yield callback (if applicable).

LLVM_ABI void

emitError (const Instruction *I, const Twine &ErrorStr)

emitError - Emit an error message to the currently installed error handler with optional location information.

LLVM_ABI void

emitError (const Twine &ErrorStr)

LLVM_ABI OptPassGate &

getOptPassGate () const

Access the object which can disable optional passes and individual optimizations at compile time.

LLVM_ABI void

setOptPassGate (OptPassGate &)

Set the object which can disable optional passes and individual optimizations at compile time.

LLVM_ABI StringRef

getDefaultTargetCPU ()

Get or set the current "default" target CPU (target-cpu function attribute).

LLVM_ABI void

setDefaultTargetCPU (StringRef CPU)

LLVM_ABI StringRef

getDefaultTargetFeatures ()

Similar to {get,set}DefaultTargetCPU() but for default target-features.

LLVM_ABI void

setDefaultTargetFeatures (StringRef Features)

LLVM_ABI void

updateDILocationAtomGroupWaterline (uint64_t G)

Key Instructions: update the highest number atom group emitted for any function.

LLVM_ABI uint64_t

incNextDILocationAtomGroup ()

Key Instructions: get the next free atom group number and increment the global tracker.

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 305 of file Config.h.