CIRCT  19.0.0git
Classes | Macros | Typedefs
FIRParser.cpp File Reference
#include "circt/Dialect/FIRRTL/FIRParser.h"
#include "FIRAnnotations.h"
#include "FIRLexer.h"
#include "circt/Dialect/FIRRTL/AnnotationDetails.h"
#include "circt/Dialect/FIRRTL/CHIRRTLDialect.h"
#include "circt/Dialect/FIRRTL/FIRRTLAttributes.h"
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"
#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"
#include "circt/Dialect/FIRRTL/Import/FIRAnnotations.h"
#include "circt/Dialect/HW/HWAttributes.h"
#include "circt/Dialect/HW/InnerSymbolNamespace.h"
#include "circt/Support/LLVM.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Threading.h"
#include "mlir/IR/Verifier.h"
#include "mlir/Support/Timing.h"
#include "mlir/Tools/mlir-translate/Translation.h"
#include "llvm/ADT/PointerEmbeddedInt.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
#include "FIRTokenKinds.def"
Include dependency graph for FIRParser.cpp:

Go to the source code of this file.

Classes

class  FIRParser::LocWithInfo
 This helper class is used to handle Info records, which specify higher level symbolic source location, that may be missing from the file. More...
 

Macros

#define TOK_KEYWORD(spelling)   case FIRToken::kw_##spelling:
 
#define TOK_LPKEYWORD_PRIM(SPELLING, CLASS, NUMOPERANDS)    case FIRToken::lp_##SPELLING:
 
#define TOK_LPKEYWORD_PRIM(SPELLING, CLASS, NUMOPERANDS)
 
#define TOK_LPKEYWORD_PRIM(SPELLING, CLASS, NUMOPERANDS)
 

Typedefs

using UnbundledID = llvm::PointerEmbeddedInt< unsigned, 31 >
 
using SymbolValueEntry = llvm::PointerUnion< Value, UnbundledID >
 
using ModuleSymbolTable = llvm::StringMap< std::pair< SMLoc, SymbolValueEntry >, llvm::BumpPtrAllocator >
 
using ModuleSymbolTableEntry = ModuleSymbolTable::MapEntryTy
 
using UnbundledValueEntry = SmallVector< std::pair< Attribute, Value > >
 
using UnbundledValuesList = std::vector< UnbundledValueEntry >
 
using SubaccessCache = llvm::DenseMap< std::pair< Value, unsigned >, Value >
 

Macro Definition Documentation

◆ TOK_KEYWORD

#define TOK_KEYWORD (   spelling)    case FIRToken::kw_##spelling:

◆ TOK_LPKEYWORD_PRIM [1/3]

#define TOK_LPKEYWORD_PRIM (   SPELLING,
  CLASS,
  NUMOPERANDS 
)     case FIRToken::lp_##SPELLING:

◆ TOK_LPKEYWORD_PRIM [2/3]

#define TOK_LPKEYWORD_PRIM (   SPELLING,
  CLASS,
  NUMOPERANDS 
)
Value:
case FIRToken::lp_##SPELLING: \
numOperandsExpected = NUMOPERANDS; \
break;

◆ TOK_LPKEYWORD_PRIM [3/3]

#define TOK_LPKEYWORD_PRIM (   SPELLING,
  CLASS,
  NUMOPERANDS 
)
Value:
case FIRToken::lp_##SPELLING: { \
auto resultTy = CLASS::inferReturnType(operands, attrs, {}); \
if (!resultTy) { \
/* only call translateLocation on an error case, it is expensive. */ \
(void)CLASS::validateAndInferReturnType(operands, attrs, \
translateLocation(loc)); \
return failure(); \
} \
result = builder.create<CLASS>(resultTy, operands, attrs); \
break; \
}
Builder builder

Typedef Documentation

◆ ModuleSymbolTable

using ModuleSymbolTable = llvm::StringMap<std::pair<SMLoc, SymbolValueEntry>, llvm::BumpPtrAllocator>

Definition at line 1232 of file FIRParser.cpp.

◆ ModuleSymbolTableEntry

using ModuleSymbolTableEntry = ModuleSymbolTable::MapEntryTy

Definition at line 1234 of file FIRParser.cpp.

◆ SubaccessCache

using SubaccessCache = llvm::DenseMap<std::pair<Value, unsigned>, Value>

Definition at line 1251 of file FIRParser.cpp.

◆ SymbolValueEntry

using SymbolValueEntry = llvm::PointerUnion<Value, UnbundledID>

Definition at line 1230 of file FIRParser.cpp.

◆ UnbundledID

using UnbundledID = llvm::PointerEmbeddedInt<unsigned, 31>

Definition at line 1229 of file FIRParser.cpp.

◆ UnbundledValueEntry

using UnbundledValueEntry = SmallVector<std::pair<Attribute, Value> >

Definition at line 1236 of file FIRParser.cpp.

◆ UnbundledValuesList

Definition at line 1237 of file FIRParser.cpp.