|
LLVM 24.0.0git
|
!op (X) - Transform an init. More...
#include "llvm/TableGen/Record.h"
Public Types | |
| enum | UnaryOp : uint8_t { TOLOWER , TOUPPER , CAST , NOT , HEAD , TAIL , SIZE , EMPTY , GETDAGOP , GETDAGOPNAME , LOG2 , REPR , LISTFLATTEN , INITIALIZED } |
Public Member Functions | |
| UnOpInit (const UnOpInit &)=delete | |
| UnOpInit & | operator= (const UnOpInit &)=delete |
| UnaryOp | getOpcode () const |
| const Init * | getOperand () const |
| std::tuple< UnaryOp, const Init *, const RecTy * > | getKey () const |
| const Init * | Fold (const Record *CurRec, bool IsFinal=false) const |
| 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. | |
| std::string | getAsString () const override |
| Convert this value to a literal form. | |
| Public Member Functions inherited from llvm::OpInit | |
| OpInit (const OpInit &)=delete | |
| OpInit & | operator= (OpInit &)=delete |
| const Init * | getBit (unsigned Bit) const final |
Get the Init value of the specified bit. | |
| Public Member Functions inherited from llvm::TypedInit | |
| TypedInit (const TypedInit &)=delete | |
| TypedInit & | operator= (const TypedInit &)=delete |
| const RecTy * | getType () const |
| Get the type of the Init as a RecTy. | |
| RecordKeeper & | getRecordKeeper () const |
| Get the record keeper that initialized this Init. | |
| const Init * | getCastTo (const 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. | |
| const Init * | convertInitializerTo (const RecTy *Ty) const override |
Convert to a value whose type is Ty, or return null if this is not possible. | |
| const Init * | convertInitializerBitRange (ArrayRef< unsigned > Bits) const override |
| This function is used to implement the bit range selection operator. | |
| const RecTy * | getFieldType (const StringInit *FieldName) const override |
| This method is used to implement the FieldInit class. | |
| Public Member Functions inherited from llvm::Init | |
| InitKind | getKind () const |
| Get the kind (type) of the value. | |
| bool | isTriviallyResolved () const |
| Return true if resolveReferences returns this value unchanged with any resolver. | |
| RecordKeeper & | getRecordKeeper () const |
| Get the record keeper that initialized this Init. | |
| 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? | |
| virtual bool | isConcrete () const |
| Is this a concrete and fully resolved value without any references or stuck operations? | |
| void | print (raw_ostream &OS) const |
| Print this value. | |
| virtual std::string | getAsUnquotedString () const |
| Convert this value to a literal form, without adding quotes around a string. | |
| void | dump () const |
| Debugging method that may be called through a debugger; just invokes print on stderr. | |
| Public Member Functions inherited from llvm::FoldingSetNode | |
| FoldingSetNode ()=default | |
| uint32_t | getFoldingSetHash () const |
| void | setFoldingSetHash (uint32_t Hash) |
Static Public Member Functions | |
| static bool | classof (const Init *I) |
| static const UnOpInit * | get (UnaryOp opc, const Init *lhs, const RecTy *Type) |
| Static Public Member Functions inherited from llvm::OpInit | |
| static bool | classof (const Init *I) |
| Static Public Member Functions inherited from llvm::TypedInit | |
| static bool | classof (const Init *I) |
| Static Public Member Functions inherited from llvm::Init | |
| static bool | isLeafKind (InitKind K) |
Return true if K is a value kind that cannot contain references. | |
| enum llvm::UnOpInit::UnaryOp : uint8_t |
Definition at line 884 of file Record.h.
References I, and llvm::Init::IK_UnOpInit.
Definition at line 774 of file Record.cpp.
References llvm::append_range(), assert(), CAST, llvm::cast(), llvm::Init::convertInitializerTo(), D(), llvm::dyn_cast(), llvm::dyn_cast_or_null(), EMPTY, llvm::IntInit::get(), llvm::IntRecTy::get(), llvm::ListInit::get(), llvm::StringInit::get(), llvm::RecTy::getAsString(), getAsString(), GETDAGOP, GETDAGOPNAME, llvm::RecordKeeper::getDef(), llvm::Record::getLoc(), llvm::Record::getNameInit(), getOpcode(), llvm::TypedInit::getRecordKeeper(), llvm::TypedInit::getType(), HEAD, INITIALIZED, INT64_MAX, llvm::isa(), llvm::List, LISTFLATTEN, LOG2, llvm::Log2_64(), NOT, llvm::PrintFatalError(), REPR, SIZE, T, TAIL, TOLOWER, TOUPPER, and llvm::RecTy::typeIsA().
Referenced by llvm::TypedInit::getCastTo().
Definition at line 763 of file Record.cpp.
References detail::RecordKeeperImpl::Allocator, I, llvm::UniquingSet< T, Info >::insert(), llvm::UniquingSet< T, Info >::lookup(), llvm::Init::Opc, and detail::RecordKeeperImpl::TheUnOpInitPool.
Referenced by llvm::TypedInit::getCastTo(), and resolveReferences().
|
overridevirtual |
Convert this value to a literal form.
Implements llvm::Init.
Definition at line 985 of file Record.cpp.
References CAST, EMPTY, llvm::RecTy::getAsString(), GETDAGOP, GETDAGOPNAME, getOpcode(), llvm::TypedInit::getType(), HEAD, INITIALIZED, LISTFLATTEN, LOG2, NOT, REPR, SIZE, TAIL, TOLOWER, and TOUPPER.
Referenced by Fold().
Definition at line 893 of file Record.h.
References getOpcode(), and llvm::TypedInit::getType().
|
inline |
Definition at line 890 of file Record.h.
References llvm::Init::Opc.
Referenced by Fold(), getAsString(), getKey(), and resolveReferences().
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 976 of file Record.cpp.
References CAST, get(), getOpcode(), llvm::TypedInit::getType(), and llvm::Init::resolveReferences().