MLIR  20.0.0git
Namespaces | Typedefs | Functions
DebuggerExecutionContextHook.h File Reference
#include "mlir-c/IR.h"
#include "mlir/Debug/ExecutionContext.h"
#include "llvm/Support/Compiler.h"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 

Typedefs

typedef struct MLIRBreakpoint * BreakpointHandle
 
typedef struct MLIRIRunit * irunitHandle
 

Functions

void mlirDebuggerSetControl (int controlOption)
 This is used by the debugger to control what to do after a breakpoint is hit. More...
 
void mlirDebuggerPrintContext ()
 Print the available context for the current Action. More...
 
void mlirDebuggerPrintActionBacktrace (bool withContext)
 Print the current action backtrace. More...
 
void mlirDebuggerCursorPrint (bool withRegion)
 Print the current IR unit cursor. More...
 
void mlirDebuggerCursorSelectIRUnitFromContext (int index)
 Select the IR unit from the current context by ID. More...
 
void mlirDebuggerCursorSelectParentIRUnit ()
 Select the parent IR unit of the provided IR unit, or print an error if the IR unit has no parent. More...
 
void mlirDebuggerCursorSelectChildIRUnit (int index)
 Select the child IR unit at the provided index, print an error if the index is out of bound. More...
 
void mlirDebuggerCursorSelectPreviousIRUnit ()
 Return the next IR unit logically in the IR. More...
 
void mlirDebuggerCursorSelectNextIRUnit ()
 Return the previous IR unit logically in the IR. More...
 
void mlirDebuggerEnableBreakpoint (BreakpointHandle breakpoint)
 Enable the provided breakpoint. More...
 
void mlirDebuggerDisableBreakpoint (BreakpointHandle breakpoint)
 Disable the provided breakpoint. More...
 
BreakpointHandle mlirDebuggerAddTagBreakpoint (const char *tag)
 Add a breakpoint matching exactly the provided tag. More...
 
void mlirDebuggerAddRewritePatternBreakpoint (const char *patternNameInfo)
 Add a breakpoint matching a pattern by name. More...
 
void mlirDebuggerAddFileLineColLocBreakpoint (const char *file, int line, int col)
 Add a breakpoint matching a file, line and column. More...
 
void mlir::setupDebuggerExecutionContextHook (tracing::ExecutionContext &executionContext)
 

Typedef Documentation

◆ BreakpointHandle

typedef struct MLIRBreakpoint* BreakpointHandle

Definition at line 24 of file DebuggerExecutionContextHook.h.

◆ irunitHandle

typedef struct MLIRIRunit* irunitHandle

Definition at line 25 of file DebuggerExecutionContextHook.h.

Function Documentation

◆ mlirDebuggerAddFileLineColLocBreakpoint()

void mlirDebuggerAddFileLineColLocBreakpoint ( const char *  file,
int  line,
int  col 
)

Add a breakpoint matching a file, line and column.

Definition at line 294 of file DebuggerExecutionContextHook.cpp.

References getGlobalDebuggerState().

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerAddRewritePatternBreakpoint()

void mlirDebuggerAddRewritePatternBreakpoint ( const char *  patternNameInfo)

Add a breakpoint matching a pattern by name.

Definition at line 292 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerAddTagBreakpoint()

BreakpointHandle mlirDebuggerAddTagBreakpoint ( const char *  tag)

Add a breakpoint matching exactly the provided tag.

Definition at line 283 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerCursorPrint()

void mlirDebuggerCursorPrint ( bool  withRegion)

Print the current IR unit cursor.

Definition at line 86 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerCursorSelectChildIRUnit()

void mlirDebuggerCursorSelectChildIRUnit ( int  index)

Select the child IR unit at the provided index, print an error if the index is out of bound.

For example if the irunit is an operation, the children IR units will be the operation's regions.

Definition at line 138 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerCursorSelectIRUnitFromContext()

void mlirDebuggerCursorSelectIRUnitFromContext ( int  index)

Select the IR unit from the current context by ID.

Definition at line 99 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerCursorSelectNextIRUnit()

void mlirDebuggerCursorSelectNextIRUnit ( )

Return the previous IR unit logically in the IR.

For example if the irunit is a Region, the previous IR unit will be the previous region in the parent operation or nullptr if there is no previous region.

Definition at line 230 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerCursorSelectParentIRUnit()

void mlirDebuggerCursorSelectParentIRUnit ( )

Select the parent IR unit of the provided IR unit, or print an error if the IR unit has no parent.

Definition at line 117 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerCursorSelectPreviousIRUnit()

void mlirDebuggerCursorSelectPreviousIRUnit ( )

Return the next IR unit logically in the IR.

For example if the irunit is a Region the next IR unit will be the next region in the parent operation or nullptr if there is no next region.

Definition at line 188 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerDisableBreakpoint()

void mlirDebuggerDisableBreakpoint ( BreakpointHandle  breakpoint)

Disable the provided breakpoint.

Definition at line 279 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerEnableBreakpoint()

void mlirDebuggerEnableBreakpoint ( BreakpointHandle  breakpoint)

Enable the provided breakpoint.

Definition at line 275 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerPrintActionBacktrace()

void mlirDebuggerPrintActionBacktrace ( bool  withContext)

Print the current action backtrace.

Definition at line 73 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerPrintContext()

void mlirDebuggerPrintContext ( )

Print the available context for the current Action.

Definition at line 55 of file DebuggerExecutionContextHook.cpp.

Referenced by preventLinkerDeadCodeElim().

◆ mlirDebuggerSetControl()

void mlirDebuggerSetControl ( int  controlOption)

This is used by the debugger to control what to do after a breakpoint is hit.

See tracing::ExecutionContext::Control for more information.

Definition at line 50 of file DebuggerExecutionContextHook.cpp.

References getGlobalDebuggerState().

Referenced by preventLinkerDeadCodeElim().