21#ifndef CONVERSION_IMPORTVERILOG_CAPTUREANALYSIS_H
22#define CONVERSION_IMPORTVERILOG_CAPTUREANALYSIS_H
25#include "llvm/ADT/SetVector.h"
30class SubroutineSymbol;
33class HierarchicalReference;
34enum class SymbolKind : int;
39namespace ImportVerilog {
47const slang::ast::InstanceSymbol *
53using CaptureMap = DenseMap<
const slang::ast::SubroutineSymbol *,
60 const slang::ast::ValueSymbol *
symbol;
70 SmallVectorImpl<AmbiguousHierCapture> &ambiguous);
const slang::ast::InstanceSymbol * getRootInstance(const slang::ast::HierarchicalReference &ref)
Return the first instance on a hierarchical reference path, i.e.
CaptureMap analyzeFunctionCaptures(const slang::ast::RootSymbol &root, SmallVectorImpl< AmbiguousHierCapture > &ambiguous)
Analyze the AST rooted at root to determine which variables each function captures: symbols reference...
bool isCompileTimeConstant(slang::ast::SymbolKind kind)
Return true if symbols of this kind are elaboration-time constants.
DenseMap< const slang::ast::SubroutineSymbol *, SmallSetVector< const slang::ast::ValueSymbol *, 4 > > CaptureMap
The result of capture analysis: for each function, the set of non-local, non-global variable symbols ...
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
A function whose hierarchical reference resolves to one symbol reachable through more than one instan...
const slang::ast::ValueSymbol * symbol
const slang::ast::SubroutineSymbol * function