LLVM
15.0.0git
|
!op (X) - Transform an init. More...
#include "llvm/TableGen/Record.h"
Public Types | |
enum | UnaryOp : uint8_t { CAST, NOT, HEAD, TAIL, SIZE, EMPTY, GETDAGOP } |
Public Member Functions | |
UnOpInit (const UnOpInit &)=delete | |
UnOpInit & | operator= (const UnOpInit &)=delete |
void | Profile (FoldingSetNodeID &ID) const |
OpInit * | clone (ArrayRef< Init * > Operands) const override |
unsigned | getNumOperands () const override |
Init * | getOperand (unsigned i) const override |
UnaryOp | getOpcode () const |
Init * | getOperand () const |
Init * | Fold (Record *CurRec, bool IsFinal=false) const |
Init * | resolveReferences (Resolver &R) const override |
This function is used by classes that refer to other variables which may not be defined at the time the expression is formed. More... | |
std::string | getAsString () const override |
Convert this value to a literal form. More... | |
![]() | |
OpInit (const OpInit &)=delete | |
OpInit & | operator= (OpInit &)=delete |
Init * | getBit (unsigned Bit) const override |
Get the Init value of the specified bit. More... | |
![]() | |
TypedInit (const TypedInit &)=delete | |
TypedInit & | operator= (const TypedInit &)=delete |
RecTy * | getType () const |
Get the type of the Init as a RecTy. More... | |
RecordKeeper & | getRecordKeeper () const |
Get the record keeper that initialized this Init. More... | |
Init * | getCastTo (RecTy *Ty) const override |
If this value is convertible to type Ty , return a value whose type is Ty , generating a !cast operation if required. More... | |
Init * | convertInitializerTo (RecTy *Ty) const override |
Convert to a value whose type is Ty , or return null if this is not possible. More... | |
Init * | convertInitializerBitRange (ArrayRef< unsigned > Bits) const override |
This function is used to implement the bit range selection operator. More... | |
Init * | convertInitListSlice (ArrayRef< unsigned > Elements) const override |
This function is used to implement the list slice selection operator. More... | |
RecTy * | getFieldType (StringInit *FieldName) const override |
This method is used to implement the FieldInit class. More... | |
![]() | |
InitKind | getKind () const |
Get the kind (type) of the value. More... | |
RecordKeeper & | getRecordKeeper () const |
Get the record keeper that initialized this Init. More... | |
Init (const Init &)=delete | |
Init & | operator= (const Init &)=delete |
virtual | ~Init ()=default |
virtual bool | isComplete () const |
Is this a complete value with no unset (uninitialized) subvalues? More... | |
virtual bool | isConcrete () const |
Is this a concrete and fully resolved value without any references or stuck operations? Unset values are concrete. More... | |
void | print (raw_ostream &OS) const |
Print this value. More... | |
virtual std::string | getAsUnquotedString () const |
Convert this value to a literal form, without adding quotes around a string. More... | |
void | dump () const |
Debugging method that may be called through a debugger; just invokes print on stderr. More... | |
![]() | |
Node ()=default | |
void * | getNextInBucket () const |
void | SetNextInBucket (void *N) |
Static Public Member Functions | |
static bool | classof (const Init *I) |
static UnOpInit * | get (UnaryOp opc, Init *lhs, RecTy *Type) |
![]() | |
static bool | classof (const Init *I) |
![]() | |
static bool | classof (const Init *I) |
Additional Inherited Members | |
![]() | |
enum | InitKind : uint8_t { IK_First, IK_FirstTypedInit, IK_BitInit, IK_BitsInit, IK_DagInit, IK_DefInit, IK_FieldInit, IK_IntInit, IK_ListInit, IK_FirstOpInit, IK_BinOpInit, IK_TernOpInit, IK_UnOpInit, IK_LastOpInit, IK_CondOpInit, IK_FoldOpInit, IK_IsAOpInit, IK_ExistsOpInit, IK_AnonymousNameInit, IK_StringInit, IK_VarInit, IK_VarListElementInit, IK_VarBitInit, IK_VarDefInit, IK_LastTypedInit, IK_UnsetInit } |
Discriminator enum (for isa<>, dyn_cast<>, et al.) More... | |
![]() | |
OpInit (InitKind K, RecTy *Type, uint8_t Opc) | |
![]() | |
TypedInit (InitKind K, RecTy *T, uint8_t Opc=0) | |
![]() | |
Init (InitKind K, uint8_t Opc=0) | |
![]() | |
uint8_t | Opc |
enum llvm::UnOpInit::UnaryOp : uint8_t |
Definition at line 799 of file Record.h.
References I, and llvm::Init::IK_UnOpInit.
Implements llvm::OpInit.
Definition at line 808 of file Record.h.
References assert(), get(), getOpcode(), llvm::TypedInit::getType(), and Operands.
Definition at line 777 of file Record.cpp.
References assert(), CAST, llvm::Init::convertInitializerTo(), D, llvm::tgtok::Dag, EMPTY, llvm::IntRecTy::get(), llvm::IntInit::get(), llvm::StringInit::get(), llvm::ListInit::get(), llvm::DefInit::get(), llvm::RecTy::getAsString(), getAsString(), GETDAGOP, llvm::RecordKeeper::getDef(), llvm::Record::getLoc(), llvm::Record::getNameInit(), getOpcode(), llvm::TypedInit::getRecordKeeper(), llvm::Record::getRecords(), llvm::TypedInit::getType(), HEAD, NOT, llvm::PrintFatalError(), SIZE, TAIL, and llvm::RecTy::typeIsA().
Referenced by llvm::TypedInit::getCastTo().
Definition at line 759 of file Record.cpp.
References llvm::detail::RecordKeeperImpl::Allocator, I, LHS, llvm::Init::Opc, ProfileUnOpInit(), and llvm::detail::RecordKeeperImpl::TheUnOpInitPool.
Referenced by clone(), llvm::TypedInit::getCastTo(), and resolveReferences().
|
overridevirtual |
Convert this value to a literal form.
Implements llvm::Init.
Definition at line 901 of file Record.cpp.
References CAST, EMPTY, llvm::RecTy::getAsString(), llvm::Init::getAsString(), GETDAGOP, getOpcode(), llvm::TypedInit::getType(), HEAD, NOT, SIZE, and TAIL.
Referenced by Fold().
|
inlineoverridevirtual |
Implements llvm::OpInit.
|
inline |
Definition at line 821 of file Record.h.
References llvm::Init::Opc.
Referenced by clone(), Fold(), getAsString(), Profile(), and resolveReferences().
|
inline |
|
inlineoverridevirtual |
Implements llvm::OpInit.
Definition at line 816 of file Record.h.
References assert(), getOperand(), and i.
void UnOpInit::Profile | ( | FoldingSetNodeID & | ID | ) | const |
Definition at line 773 of file Record.cpp.
References getOpcode(), getOperand(), llvm::TypedInit::getType(), and ProfileUnOpInit().
This function is used by classes that refer to other variables which may not be defined at the time the expression is formed.
If a value is set for the variable later, this method will be called on users of the value to allow the value to propagate out.
Reimplemented from llvm::Init.
Definition at line 892 of file Record.cpp.
References CAST, get(), getOpcode(), llvm::TypedInit::getType(), and llvm::Init::resolveReferences().