15 #ifndef LLVM_IR_LLVMCONTEXT_H
16 #define LLVM_IR_LLVMCONTEXT_H
31 class LLVMContextImpl;
34 template <
typename T>
class SmallVectorImpl;
187 void *DiagContext =
nullptr);
206 void *DiagContext =
nullptr,
207 bool RespectFilters =
false);
298 template <
typename ValT,
typename Base, ValT(Base::*Mem)>
333 #endif // LLVM_IR_LLVMCONTEXT_H
LLVMContext & operator=(const LLVMContext &)=delete
void setDiagnosticsOutputFile(std::unique_ptr< yaml::Output > F)
Set the diagnostics output file used for optimization diagnostics.
InlineAsmDiagHandlerTy getInlineAsmDiagnosticHandler() const
getInlineAsmDiagnosticHandler - Return the diagnostic handler set by setInlineAsmDiagnosticHandler.
A Module instance is used to store all the information related to an LLVM module. ...
const std::string & getGC(const Function &Fn)
Return the GC for a function.
void(*)(LLVMContext *Context, void *OpaqueHandle) YieldCallbackTy
Defines the type of a yield callback.
bool shouldDiscardValueNames() const
Return true if the Context runtime configuration is set to discard all value names.
DiagnosticHandlerTy getDiagnosticHandler() const
getDiagnosticHandler - Return the diagnostic handler set by setDiagnosticHandler. ...
void setGC(const Function &Fn, std::string GCName)
Define the GC for a function.
bool getDiagnosticsHotnessRequested() const
Return if a code hotness metric should be included in optimization diagnostics.
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID...
void enableDebugTypeODRUniquing()
void setInlineAsmDiagnosticHandler(InlineAsmDiagHandlerTy DiagHandler, void *DiagContext=nullptr)
setInlineAsmDiagnosticHandler - This method sets a handler that is invoked when problems with inline ...
void setYieldCallback(YieldCallbackTy Callback, void *OpaqueHandle)
Registers a yield callback with the given context.
void yield()
Calls the yield callback (if applicable).
void setDiscardValueNames(bool Discard)
Set the Context runtime configuration to discard all value name (but GlobalValue).
void disableDebugTypeODRUniquing()
void setDiagnosticsHotnessThreshold(uint64_t Threshold)
Set the minimum hotness value a diagnostic needs in order to be included in optimization diagnostics...
bool isODRUniquingDebugTypes() const
Whether there is a string map for uniquing debug info identifiers across the context.
DiagnosticSeverity
Defines the different supported severity of a diagnostic.
#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Attribute unwrap(LLVMAttributeRef Attr)
void deleteGC(const Function &Fn)
Remove the GC for a function.
void emitError(unsigned LocCookie, const Twine &ErrorStr)
emitError - Emit an error message to the currently installed error handler with optional location inf...
static OptionRegistry & instance()
Returns a reference to the singleton instance.
void setDiagnosticsHotnessRequested(bool Requested)
Set if a code hotness metric should be included in optimization diagnostics.
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
yaml::Output * getDiagnosticsOutputFile()
Return the YAML file used by the backend to save optimization diagnostics.
void getMDKindNames(SmallVectorImpl< StringRef > &Result) const
getMDKindNames - Populate client supplied SmallVector with the name for custom metadata IDs registere...
This class implements a mechanism to disable passes and individual optimizations at compile time base...
This is the base abstract class for diagnostic reporting in the backend.
This is an important class for using LLVM in a threaded context.
LLVMOrcErrorCode removeModule(ModuleHandleT H)
ValT getOption() const
Query for a debug option's value.
unsigned getMDKindID(StringRef Name) const
getMDKindID - Return a unique non-zero ID for the specified metadata kind.
void * getDiagnosticContext() const
getDiagnosticContext - Return the diagnostic context set by setDiagnosticContext. ...
The Output class is used to generate a yaml document from in-memory structs and vectors.
uint64_t getDiagnosticsHotnessThreshold() const
Return the minimum hotness value a diagnostic would need in order to be included in optimization diag...
LLVMContextImpl *const pImpl
void(*)(const DiagnosticInfo &DI, void *Context) DiagnosticHandlerTy
Defines the type of a diagnostic handler.
void getOperandBundleTags(SmallVectorImpl< StringRef > &Result) const
getOperandBundleTags - Populate client supplied SmallVector with the bundle tags registered in this L...
Synchronized with respect to all concurrently executing threads.
This file declares helper objects for defining debug options that can be configured via the command l...
static const char * getDiagnosticMessagePrefix(DiagnosticSeverity Severity)
Get the prefix that should be printed in front of a diagnostic of the given Severity.
Synchronized with respect to signal handlers executing in the same thread.
void(*)(const SMDiagnostic &, void *Context, unsigned LocCookie) InlineAsmDiagHandlerTy
void * getInlineAsmDiagnosticContext() const
getInlineAsmDiagnosticContext - Return the diagnostic context set by setInlineAsmDiagnosticHandler.
LLVMAttributeRef wrap(Attribute Attr)
OptBisect & getOptBisect()
Access the object which manages optimization bisection for failure analysis.
uint32_t getOperandBundleTagID(StringRef Tag) const
getOperandBundleTagID - Maps a bundle tag to an integer ID.
void diagnose(const DiagnosticInfo &DI)
Report a message to the currently installed diagnostic handler.
void setDiagnosticHandler(DiagnosticHandlerTy DiagHandler, void *DiagContext=nullptr, bool RespectFilters=false)
setDiagnosticHandler - This method sets a handler that is invoked when the backend needs to report an...
static int const Threshold
TODO: Write a new FunctionPass AliasAnalysis so that it can keep a cache.
StringRef - Represent a constant reference to a string, i.e.
void getSyncScopeNames(SmallVectorImpl< StringRef > &SSNs) const
getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered...
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...