mirror of https://github.com/llvm/circt.git
594b8f65df
Add the `dbg.scope` operation to the debug dialect. The op creates an additional level of hierarchy in the DI, a "scope", which can be used to group variables and other scopes. Operations such as `hw.module` introduce an implicit scope. All debug operations within a module are added to that implicit scope, unless they have an explicit `scope` operand. Providing an explicit scope can be used to represent inlined modules. Scopes in DI do not necessarily have to correspond to levels of a module hierarchy. They can also be used to model things like control flow scopes, call stacks, and other source-language concepts. This commit also introduces an optional `scope` operand on `dbg.variable`. The `DebugInfo` analysis, which traverses the IR and builds up a canonical representation of the DI, honors this operand and adds the variables to the corresponding scope. |
||
---|---|---|
.. | ||
basic.mlir |