LLVM 19.0.0git
Classes | Namespaces | Macros | Functions
Record.cpp File Reference
#include "llvm/TableGen/Record.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TableGen/Error.h"
#include <cassert>
#include <cstdint>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Classes

struct  llvm::detail::RecordKeeperImpl
 This class represents the internal implementation of the RecordKeeper. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::detail
 These are wrappers over isa* function that allow them to be used in generic algorithms such as llvm:all_of, llvm::none_of, etc.
 

Macros

#define DEBUG_TYPE   "tblgen-records"
 

Functions

static void ProfileRecordRecTy (FoldingSetNodeID &ID, ArrayRef< Record * > Classes)
 
static RecordRecTyresolveRecordTypes (RecordRecTy *T1, RecordRecTy *T2)
 
static void ProfileArgumentInit (FoldingSetNodeID &ID, Init *Value, ArgAuxType Aux)
 
static void ProfileBitsInit (FoldingSetNodeID &ID, ArrayRef< Init * > Range)
 
static bool canFitInBitfield (int64_t Value, unsigned NumBits)
 
static void ProfileListInit (FoldingSetNodeID &ID, ArrayRef< Init * > Range, RecTy *EltTy)
 
static void ProfileUnOpInit (FoldingSetNodeID &ID, unsigned Opcode, Init *Op, RecTy *Type)
 
static void ProfileBinOpInit (FoldingSetNodeID &ID, unsigned Opcode, Init *LHS, Init *RHS, RecTy *Type)
 
static StringInitConcatStringInits (const StringInit *I0, const StringInit *I1)
 
static StringInitinterleaveStringList (const ListInit *List, const StringInit *Delim)
 
static StringInitinterleaveIntList (const ListInit *List, const StringInit *Delim)
 
static ListInitConcatListInits (const ListInit *LHS, const ListInit *RHS)
 
static std::optional< unsignedgetDagArgNoByKey (DagInit *Dag, Init *Key, std::string &Error)
 
static void ProfileTernOpInit (FoldingSetNodeID &ID, unsigned Opcode, Init *LHS, Init *MHS, Init *RHS, RecTy *Type)
 
static InitItemApply (Init *LHS, Init *MHSe, Init *RHS, Record *CurRec)
 
static InitForeachDagApply (Init *LHS, DagInit *MHSd, Init *RHS, Record *CurRec)
 
static InitForeachHelper (Init *LHS, Init *MHS, Init *RHS, RecTy *Type, Record *CurRec)
 
static InitFilterHelper (Init *LHS, Init *MHS, Init *RHS, RecTy *Type, Record *CurRec)
 
static void ProfileFoldOpInit (FoldingSetNodeID &ID, Init *Start, Init *List, Init *A, Init *B, Init *Expr, RecTy *Type)
 
static void ProfileIsAOpInit (FoldingSetNodeID &ID, RecTy *CheckType, Init *Expr)
 
static void ProfileExistsOpInit (FoldingSetNodeID &ID, RecTy *CheckType, Init *Expr)
 
static void ProfileVarDefInit (FoldingSetNodeID &ID, Record *Class, ArrayRef< ArgumentInit * > Args)
 
static void ProfileCondOpInit (FoldingSetNodeID &ID, ArrayRef< Init * > CondRange, ArrayRef< Init * > ValRange, const RecTy *ValType)
 
static void ProfileDagInit (FoldingSetNodeID &ID, Init *V, StringInit *VN, ArrayRef< Init * > ArgRange, ArrayRef< StringInit * > NameRange)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "tblgen-records"

Definition at line 41 of file Record.cpp.

Function Documentation

◆ canFitInBitfield()

static bool canFitInBitfield ( int64_t  Value,
unsigned  NumBits 
)
static

Definition at line 564 of file Record.cpp.

Referenced by llvm::IntInit::convertInitializerTo().

◆ ConcatListInits()

static ListInit * ConcatListInits ( const ListInit LHS,
const ListInit RHS 
)
static

Definition at line 1081 of file Record.cpp.

References llvm::append_range(), llvm::ListInit::get(), LHS, and RHS.

Referenced by llvm::BinOpInit::getListConcat().

◆ ConcatStringInits()

static StringInit * ConcatStringInits ( const StringInit I0,
const StringInit I1 
)
static

◆ FilterHelper()

static Init * FilterHelper ( Init LHS,
Init MHS,
Init RHS,
RecTy Type,
Record CurRec 
)
static

◆ ForeachDagApply()

static Init * ForeachDagApply ( Init LHS,
DagInit MHSd,
Init RHS,
Record CurRec 
)
static

◆ ForeachHelper()

static Init * ForeachHelper ( Init LHS,
Init MHS,
Init RHS,
RecTy Type,
Record CurRec 
)
static

Definition at line 1592 of file Record.cpp.

References ForeachDagApply(), llvm::ListInit::get(), ItemApply(), LHS, and RHS.

Referenced by llvm::TernOpInit::Fold().

◆ getDagArgNoByKey()

static std::optional< unsigned > getDagArgNoByKey ( DagInit Dag,
Init Key,
std::string &  Error 
)
static

Definition at line 1176 of file Record.cpp.

References assert(), Idx, and Name.

Referenced by llvm::BinOpInit::Fold(), and llvm::TernOpInit::Fold().

◆ interleaveIntList()

static StringInit * interleaveIntList ( const ListInit List,
const StringInit Delim 
)
static

◆ interleaveStringList()

static StringInit * interleaveStringList ( const ListInit List,
const StringInit Delim 
)
static

◆ ItemApply()

static Init * ItemApply ( Init LHS,
Init MHSe,
Init RHS,
Record CurRec 
)
static

Definition at line 1557 of file Record.cpp.

References LHS, and RHS.

Referenced by FilterHelper(), ForeachDagApply(), and ForeachHelper().

◆ ProfileArgumentInit()

static void ProfileArgumentInit ( FoldingSetNodeID ID,
Init Value,
ArgAuxType  Aux 
)
static

◆ ProfileBinOpInit()

static void ProfileBinOpInit ( FoldingSetNodeID ID,
unsigned  Opcode,
Init LHS,
Init RHS,
RecTy Type 
)
static

Definition at line 994 of file Record.cpp.

References LHS, and RHS.

Referenced by llvm::BinOpInit::get(), and llvm::BinOpInit::Profile().

◆ ProfileBitsInit()

static void ProfileBitsInit ( FoldingSetNodeID ID,
ArrayRef< Init * >  Range 
)
static

Definition at line 429 of file Record.cpp.

References I.

Referenced by llvm::BitsInit::get(), and llvm::BitsInit::Profile().

◆ ProfileCondOpInit()

static void ProfileCondOpInit ( FoldingSetNodeID ID,
ArrayRef< Init * >  CondRange,
ArrayRef< Init * >  ValRange,
const RecTy ValType 
)
static

◆ ProfileDagInit()

static void ProfileDagInit ( FoldingSetNodeID ID,
Init V,
StringInit VN,
ArrayRef< Init * >  ArgRange,
ArrayRef< StringInit * >  NameRange 
)
static

◆ ProfileExistsOpInit()

static void ProfileExistsOpInit ( FoldingSetNodeID ID,
RecTy CheckType,
Init Expr 
)
static

Definition at line 2026 of file Record.cpp.

References CheckType().

Referenced by llvm::ExistsOpInit::get(), and llvm::ExistsOpInit::Profile().

◆ ProfileFoldOpInit()

static void ProfileFoldOpInit ( FoldingSetNodeID ID,
Init Start,
Init List,
Init A,
Init B,
Init Expr,
RecTy Type 
)
static

Definition at line 1895 of file Record.cpp.

References A, B, and llvm::List.

Referenced by llvm::FoldOpInit::get(), and llvm::FoldOpInit::Profile().

◆ ProfileIsAOpInit()

static void ProfileIsAOpInit ( FoldingSetNodeID ID,
RecTy CheckType,
Init Expr 
)
static

Definition at line 1964 of file Record.cpp.

References CheckType().

Referenced by llvm::IsAOpInit::get(), and llvm::IsAOpInit::Profile().

◆ ProfileListInit()

static void ProfileListInit ( FoldingSetNodeID ID,
ArrayRef< Init * >  Range,
RecTy EltTy 
)
static

Definition at line 650 of file Record.cpp.

References I.

Referenced by llvm::ListInit::get(), and llvm::ListInit::Profile().

◆ ProfileRecordRecTy()

static void ProfileRecordRecTy ( FoldingSetNodeID ID,
ArrayRef< Record * >  Classes 
)
static

Definition at line 199 of file Record.cpp.

References llvm::ArrayRef< T >::size().

Referenced by llvm::RecordRecTy::get(), and llvm::RecordRecTy::Profile().

◆ ProfileTernOpInit()

static void ProfileTernOpInit ( FoldingSetNodeID ID,
unsigned  Opcode,
Init LHS,
Init MHS,
Init RHS,
RecTy Type 
)
static

Definition at line 1529 of file Record.cpp.

References LHS, and RHS.

Referenced by llvm::TernOpInit::get(), and llvm::TernOpInit::Profile().

◆ ProfileUnOpInit()

static void ProfileUnOpInit ( FoldingSetNodeID ID,
unsigned  Opcode,
Init Op,
RecTy Type 
)
static

Definition at line 773 of file Record.cpp.

Referenced by llvm::UnOpInit::get(), and llvm::UnOpInit::Profile().

◆ ProfileVarDefInit()

static void ProfileVarDefInit ( FoldingSetNodeID ID,
Record Class,
ArrayRef< ArgumentInit * >  Args 
)
static

Definition at line 2229 of file Record.cpp.

References I.

Referenced by llvm::VarDefInit::get(), and llvm::VarDefInit::Profile().

◆ resolveRecordTypes()

static RecordRecTy * resolveRecordTypes ( RecordRecTy T1,
RecordRecTy T2 
)
static