Go to the documentation of this file.
14 #ifndef LLVM_IR_LLVMCONTEXT_H
15 #define LLVM_IR_LLVMCONTEXT_H
31 class LLVMContextImpl;
34 template <
typename T>
class SmallVectorImpl;
35 template <
typename T>
class StringMapEntry;
38 class LLVMRemarkStreamer;
78 #define LLVM_FIXED_MD_KIND(EnumID, Name, Value) EnumID = Value,
79 #include "llvm/IR/FixedMetadataKinds.def"
80 #undef LLVM_FIXED_MD_KIND
171 void *DiagContext =
nullptr,
bool RespectFilters =
false);
181 bool RespectFilters =
false);
240 std::unique_ptr<remarks::RemarkStreamer> MainRemarkStreamer);
332 void removeModule(
Module*);
350 #endif // LLVM_IR_LLVMCONTEXT_H
LLVMContextImpl *const pImpl
void enableDebugTypeODRUniquing()
void setDiagnosticsMisExpectTolerance(std::optional< uint32_t > Tolerance)
This is an optimization pass for GlobalISel generic memory operations.
void emitError(uint64_t LocCookie, const Twine &ErrorStr)
emitError - Emit an error message to the currently installed error handler with optional location inf...
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
bool getMisExpectWarningRequested() const
uint32_t getOperandBundleTagID(StringRef Tag) const
getOperandBundleTagID - Maps a bundle tag to an integer ID.
void setMisExpectWarningRequested(bool Requested)
void * getDiagnosticContext() const
getDiagnosticContext - Return the diagnostic context set by setDiagnosticContext.
void setLLVMRemarkStreamer(std::unique_ptr< LLVMRemarkStreamer > RemarkStreamer)
@ System
Synchronized with respect to all concurrently executing threads.
remarks::RemarkStreamer * getMainRemarkStreamer()
The "main remark streamer" used by all the specialized remark streamers.
This is the base class for diagnostic handling in LLVM.
void(*)(const DiagnosticInfo &DI, void *Context) DiagnosticHandlerTy
void getSyncScopeNames(SmallVectorImpl< StringRef > &SSNs) const
getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered...
uint64_t getDiagnosticsHotnessThreshold() const
Return the minimum hotness value a diagnostic would need in order to be included in optimization diag...
void setOpaquePointers(bool Enable) const
Set whether opaque pointers are enabled.
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
bool supportsTypedPointers() const
Whether typed pointers are supported. If false, all pointers are opaque.
DiagnosticHandler::DiagnosticHandlerTy getDiagnosticHandlerCallBack() const
getDiagnosticHandlerCallBack - Return the diagnostic handler call back set by setDiagnosticHandlerCal...
void yield()
Calls the yield callback (if applicable).
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
@ SingleThread
Synchronized with respect to signal handlers executing in the same thread.
bool isODRUniquingDebugTypes() const
Whether there is a string map for uniquing debug info identifiers across the context.
void disableDebugTypeODRUniquing()
DiagnosticSeverity
Defines the different supported severity of a diagnostic.
const std::string & getGC(const Function &Fn)
Return the GC for a function.
Attribute unwrap(LLVMAttributeRef Attr)
This is the base abstract class for diagnostic reporting in the backend.
void setDiagnosticHandler(std::unique_ptr< DiagnosticHandler > &&DH, bool RespectFilters=false)
setDiagnosticHandler - This method sets unique_ptr to object of DiagnosticHandler to provide custom d...
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
void setDiagnosticsHotnessThreshold(std::optional< uint64_t > Threshold)
Set the minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
OptPassGate & getOptPassGate() const
Access the object which can disable optional passes and individual optimizations at compile time.
const DiagnosticHandler * getDiagHandlerPtr() const
getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler.
uint32_t getDiagnosticsMisExpectTolerance() const
void(*)(LLVMContext *Context, void *OpaqueHandle) YieldCallbackTy
Defines the type of a yield callback.
std::unique_ptr< DiagnosticHandler > getDiagnosticHandler()
getDiagnosticHandler - transfers ownership of DiagnosticHandler unique_ptr to caller.
bool shouldDiscardValueNames() const
Return true if the Context runtime configuration is set to discard all value names.
This is an important class for using LLVM in a threaded context.
void setGC(const Function &Fn, std::string GCName)
Define the GC for a function.
void setYieldCallback(YieldCallbackTy Callback, void *OpaqueHandle)
Registers a yield callback with the given context.
into xmm2 addss xmm2 xmm1 xmm3 addss xmm3 movaps xmm0 unpcklps xmm0 ret seems silly when it could just be one addps Expand libm rounding functions inline
void setDiagnosticsHotnessRequested(bool Requested)
Set if a code hotness metric should be included in optimization diagnostics.
A Module instance is used to store all the information related to an LLVM module.
void setMainRemarkStreamer(std::unique_ptr< remarks::RemarkStreamer > MainRemarkStreamer)
LLVMAttributeRef wrap(Attribute Attr)
static void DiagHandler(const SMDiagnostic &Diag, void *Context)
StringRef - Represent a constant reference to a string, i.e.
bool isDiagnosticsHotnessThresholdSetFromPSI() const
Return if hotness threshold is requested from PSI.
Machine Check Debug Module
LLVMRemarkStreamer * getLLVMRemarkStreamer()
The "LLVM remark streamer" used by LLVM to serialize remark diagnostics comming from IR and MIR passe...
static const char * getDiagnosticMessagePrefix(DiagnosticSeverity Severity)
Get the prefix that should be printed in front of a diagnostic of the given Severity.
void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
void getMDKindNames(SmallVectorImpl< StringRef > &Result) const
getMDKindNames - Populate client supplied SmallVector with the name for custom metadata IDs registere...
void setOptPassGate(OptPassGate &)
Set the object which can disable optional passes and individual optimizations at compile time.
void setDiscardValueNames(bool Discard)
Set the Context runtime configuration to discard all value name (but GlobalValue).
bool getDiagnosticsHotnessRequested() const
Return if a code hotness metric should be included in optimization diagnostics.
void getOperandBundleTags(SmallVectorImpl< StringRef > &Result) const
getOperandBundleTags - Populate client supplied SmallVector with the bundle tags registered in this L...
void deleteGC(const Function &Fn)
Remove the GC for a 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 ...
unsigned getMDKindID(StringRef Name) const
getMDKindID - Return a unique non-zero ID for the specified metadata kind.
StringMapEntry< uint32_t > * getOrInsertBundleTag(StringRef TagName) const
getOrInsertBundleTag - Returns the Tag to use for an operand bundle of name TagName.
@ OB_clang_arc_attachedcall
LLVMContext & operator=(const LLVMContext &)=delete