Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
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/Regex.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 * > Elements, 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 ProfileInstancesOpInit (FoldingSetNodeID &ID, const RecTy *Type, const Init *Regex)
static void ProfileVarDefInit (FoldingSetNodeID &ID, const Record *Class, ArrayRef< const ArgumentInit * > Args)
static void ProfileCondOpInit (FoldingSetNodeID &ID, ArrayRef< const Init * > Conds, ArrayRef< const Init * > Vals, const RecTy *ValType)
static void ProfileDagInit (FoldingSetNodeID &ID, const Init *V, const StringInit *VN, ArrayRef< const Init * > Args, ArrayRef< const StringInit * > ArgNames)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "tblgen-records"

Definition at line 43 of file Record.cpp.

Function Documentation

◆ canFitInBitfield()

bool canFitInBitfield ( int64_t Value,
unsigned NumBits )
static

Definition at line 617 of file Record.cpp.

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

◆ ConcatListInits()

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

Definition at line 1179 of file Record.cpp.

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

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

◆ ConcatStringInits()

◆ FilterHelper()

◆ ForeachDagApply()

◆ ForeachHelper()

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

◆ getDagArgNoByKey()

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

◆ interleaveIntList()

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

◆ interleaveStringList()

◆ ItemApply()

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

Definition at line 1710 of file Record.cpp.

References LHS, and RHS.

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

◆ ProfileArgumentInit()

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

◆ ProfileBinOpInit()

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

Definition at line 1090 of file Record.cpp.

References LHS, and RHS.

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

◆ ProfileBitsInit()

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

Definition at line 462 of file Record.cpp.

References I, and Range.

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

◆ ProfileCondOpInit()

void ProfileCondOpInit ( FoldingSetNodeID & ID,
ArrayRef< const Init * > Conds,
ArrayRef< const Init * > Vals,
const RecTy * ValType )
static

Definition at line 2623 of file Record.cpp.

References assert(), Cond, llvm::ArrayRef< T >::size(), and llvm::zip().

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

◆ ProfileDagInit()

void ProfileDagInit ( FoldingSetNodeID & ID,
const Init * V,
const StringInit * VN,
ArrayRef< const Init * > Args,
ArrayRef< const StringInit * > ArgNames )
static

Definition at line 2738 of file Record.cpp.

References llvm::zip_equal().

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

◆ ProfileExistsOpInit()

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

Definition at line 2182 of file Record.cpp.

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

◆ ProfileFoldOpInit()

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 2047 of file Record.cpp.

References A(), and B().

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

◆ ProfileInstancesOpInit()

void ProfileInstancesOpInit ( FoldingSetNodeID & ID,
const RecTy * Type,
const Init * Regex )
static

Definition at line 2257 of file Record.cpp.

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

◆ ProfileIsAOpInit()

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

Definition at line 2118 of file Record.cpp.

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

◆ ProfileListInit()

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

Definition at line 702 of file Record.cpp.

References E().

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

◆ ProfileRecordRecTy()

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

Definition at line 234 of file Record.cpp.

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

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

◆ ProfileTernOpInit()

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

Definition at line 1680 of file Record.cpp.

References LHS, and RHS.

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

◆ ProfileUnOpInit()

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

Definition at line 821 of file Record.cpp.

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

◆ ProfileVarDefInit()

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

Definition at line 2444 of file Record.cpp.

References I.

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

◆ resolveRecordTypes()