Lines Matching refs:action

13 *   Compiler developer defines an [`action`](#debug-action) that is taken by the
16 to this action, to an [`action manager`](#debug-action-manager) that will
17 provide an answer as to what behavior the action should take.
18 * An external entity registers an [`action handler`](#debug-action-handler)
19 with the action manager, and provides the logic to resolve queries on
23 interesting handlers. The set of possible action queries is detailed in the
24 [`action manager`](#debug-action-manager) section below.
28 A `debug action` is essentially a marker for a type of action that may be
30action”, it can be as simple as “perform this fold” and as complex as “run this
31 pass pipeline”. An action is comprised of the following:
40 - A short description of what the action represents.
44 - The types of values that are passed to queries related to this action,
47 Below is an example action that may be provided by the
52 /// A debug action that allows for controlling the application of patterns.
53 /// A new action type can be defined by inheriting from `DebugAction`.
57 /// * The parameters for the action are provided via template parameters when
73 [action handlers](#debug-action-handler). When resolving a query for an action,
76 TODO: It may be interesting to support merging results from multiple action
84 /// Returns true if the given action type should be executed, false otherwise.
85 /// `Params` correspond to any action specific parameters that may be used to
92 Building on the example from the [previous section](#debug-action), an example
96 /// A debug action that allows for controlling the application of patterns.
111 // Query the action manager to see if `currentPattern` should be applied to
119 A debug action handler provides the internal implementation for the various
120 action related queries within the [`DebugActionManager`](#debug-action-manager).
124 handlers; action-specific handlers and generic handlers.
128 Action specific handlers handle a specific debug action type, with the
129 parameters to its query methods mapping 1-1 to the parameter types of the action
130 type. An action specific handler can be defined by inheriting from the handler
132 action that should be handled. An example using our running pattern example is
140 /// action was not handled (allowing for other handlers to process it), or the
141 /// boolean true/false signifying if the action should execute or not.
149 A generic handler allows for handling queries on any action type. These types of
151 necessarily need to interpret the exact action parameters, or can rely on an
153 take a set of opaque parameters that try to map the context of the action type
159 /// The return type of this method is the same as the action-specific handler.
160 /// The arguments to this method map the concepts of an action type in an
162 /// of the action is still somewhat user readable, or at least loggable as
164 /// - actionTag: The tag specified by the action type.
165 /// - actionDesc: The description specified by the action type.
173 MLIR provides several common debug action handlers for immediate use that have
182 specific debug action and enabling/disabling execution of this action based on
183 the value of the counter. The counter controls the execution of the action with
185 initial executions of a debug action. The "count" value is used to prevent a
186 debug action from executing after it has executed for a set number of times (not
188 negative, the action will always execute. If the "count" value is negative, the
189 action will always execute after the "skip" value has been reached. For example,
190 a counter for a debug action with `skip=47` and `count=2`, would skip the first
193 selected; allowing for finding the exact execution of a debug action that
196 Note: The DebugCounter action handler does not support multi-threaded execution,
204 `<count-name>=<counter-value>`. A `<counter-name>` is the debug action tag to
228 <action-tag> : {<current-count>,<skip>,<count>}
231 For example, using the options above we can see how many times an action is