MLIR
20.0.0git
|
A record of metadata for/about a variable, used by VarEnv
.
More...
#include "Dialect/SparseTensor/IR/Detail/Var.h"
Public Types | |
enum class | ID : unsigned |
Newtype for unique identifiers of VarInfo records, to ensure they aren't confused with Var::Num . More... | |
Public Member Functions | |
constexpr | VarInfo (ID id, StringRef name, llvm::SMLoc loc, VarKind vk, std::optional< Var::Num > n={}) |
constexpr StringRef | getName () const |
constexpr llvm::SMLoc | getLoc () const |
Location | getLocation (AsmParser &parser) const |
constexpr ID | getID () const |
constexpr VarKind | getKind () const |
constexpr std::optional< Var::Num > | getNum () const |
constexpr bool | hasNum () const |
void | setNum (Var::Num n) |
constexpr Var | getVar () const |
A record of metadata for/about a variable, used by VarEnv
.
The principal goal of this record is to enable VarEnv
to be used for incremental parsing; in particular, VarInfo
allows the Var::Num
to remain unknown, since each record is instead identified by VarInfo::ID
. Therefore the VarEnv
can freely allocate VarInfo::ID
in whatever order it likes, irrespective of the binding order (Var::Num
) of the associated variable.
|
strong |
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 304 of file Var.h.
Referenced by isUsageConsistent().
|
inlineconstexpr |
Definition at line 300 of file Var.h.
References mlir::AsmParser::getEncodedSourceLoc().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Definition at line 308 of file Var.h.
References hasNum().
Referenced by mlir::sparse_tensor::ir_detail::VarEnv::getVar().
|
inlineconstexpr |
void VarInfo::setNum | ( | Var::Num | n | ) |
Definition at line 134 of file Var.cpp.
References hasNum(), and mlir::sparse_tensor::ir_detail::Var::isWF_Num().