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

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "tblgen-records"

Definition at line 42 of file Record.cpp.

Function Documentation

◆ canFitInBitfield()

static bool canFitInBitfield ( int64_t  Value,
unsigned  NumBits 
)
static

Definition at line 601 of file Record.cpp.

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

◆ ConcatListInits()

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

Definition at line 1158 of file Record.cpp.

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

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

◆ ConcatStringInits()

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

◆ FilterHelper()

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

◆ ForeachDagApply()

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

◆ ForeachHelper()

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

Definition at line 1688 of file Record.cpp.

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

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

◆ getDagArgNoByKey()

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

Definition at line 1254 of file Record.cpp.

References assert(), Idx, and Name.

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

◆ interleaveIntList()

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

◆ interleaveStringList()

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

◆ ItemApply()

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

Definition at line 1652 of file Record.cpp.

References LHS, and RHS.

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

◆ ProfileArgumentInit()

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

◆ ProfileBinOpInit()

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

Definition at line 1069 of file Record.cpp.

References LHS, and RHS.

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

◆ ProfileBitsInit()

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

Definition at line 459 of file Record.cpp.

References I, and Range.

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

◆ ProfileCondOpInit()

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

◆ ProfileDagInit()

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

◆ ProfileExistsOpInit()

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

Definition at line 2126 of file Record.cpp.

References CheckType().

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

◆ ProfileFoldOpInit()

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

Definition at line 1993 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,
const RecTy CheckType,
const Init Expr 
)
static

Definition at line 2064 of file Record.cpp.

References CheckType().

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

◆ ProfileListInit()

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

Definition at line 687 of file Record.cpp.

References I, and Range.

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

◆ ProfileRecordRecTy()

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

Definition at line 231 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,
const Init LHS,
const Init MHS,
const Init RHS,
const RecTy Type 
)
static

Definition at line 1622 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,
const Init Op,
const RecTy Type 
)
static

Definition at line 809 of file Record.cpp.

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

◆ ProfileVarDefInit()

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

Definition at line 2324 of file Record.cpp.

References I.

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

◆ resolveRecordTypes()

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