LLVM API Documentation
#include <InlineAsm.h>
Classes | |
struct | ConstraintInfo |
struct | SubConstraintInfo |
Public Types | |
enum | AsmDialect { AD_ATT, AD_Intel } |
enum | ConstraintPrefix { isInput, isOutput, isClobber } |
typedef std::vector< std::string > | ConstraintCodeVector |
typedef std::vector < SubConstraintInfo > | SubConstraintInfoVector |
typedef std::vector < ConstraintInfo > | ConstraintInfoVector |
![]() | |
enum | ValueTy { ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal, GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal, ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal, ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal, ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal, PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal, ConstantLastVal = ConstantPointerNullVal } |
typedef value_use_iterator< User > | use_iterator |
typedef value_use_iterator < const User > | const_use_iterator |
Public Member Functions | |
bool | hasSideEffects () const |
bool | isAlignStack () const |
AsmDialect | getDialect () const |
PointerType * | getType () const |
FunctionType * | getFunctionType () const |
const std::string & | getAsmString () const |
const std::string & | getConstraintString () const |
ConstraintInfoVector | ParseConstraints () const |
enum | LLVM_ENUM_INT_TYPE (uint32_t) |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
Friends | |
struct | ConstantCreator< InlineAsm, PointerType, InlineAsmKeyType > |
class | ConstantUniqueMap< InlineAsmKeyType, const InlineAsmKeyType &, PointerType, InlineAsm, false > |
Additional Inherited Members | |
![]() | |
static const unsigned | MaximumAlignment = 1u << 29 |
![]() | |
virtual void | printCustom (raw_ostream &O) const |
Value (Type *Ty, unsigned scid) | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
![]() | |
unsigned char | SubclassOptionalData: 7 |
Definition at line 35 of file InlineAsm.h.
typedef std::vector<std::string> llvm::InlineAsm::ConstraintCodeVector |
Definition at line 102 of file InlineAsm.h.
typedef std::vector<ConstraintInfo> llvm::InlineAsm::ConstraintInfoVector |
Definition at line 118 of file InlineAsm.h.
typedef std::vector<SubConstraintInfo> llvm::InlineAsm::SubConstraintInfoVector |
Definition at line 117 of file InlineAsm.h.
Enumerator | |
---|---|
AD_ATT | |
AD_Intel |
Definition at line 37 of file InlineAsm.h.
Enumerator | |
---|---|
isInput | |
isOutput | |
isClobber |
Definition at line 96 of file InlineAsm.h.
Definition at line 192 of file InlineAsm.h.
References llvm::Value::getValueID(), and llvm::Value::InlineAsmVal.
|
static |
InlineAsm::get - Return the specified uniqued inline asm string.
Definition at line 28 of file InlineAsm.cpp.
References llvm::Type::getContext(), llvm::PointerType::getUnqual(), llvm::LLVMContextImpl::InlineAsms, and llvm::LLVMContext::pImpl.
Referenced by inlineAsmOut(), LLVMConstInlineAsm(), and llvm::MapValue().
|
inline |
Definition at line 86 of file InlineAsm.h.
Referenced by llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), and llvm::ConstantKeyData< InlineAsm >::getValType().
|
inline |
Definition at line 87 of file InlineAsm.h.
Referenced by llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), and llvm::ConstantKeyData< InlineAsm >::getValType().
|
inline |
Definition at line 74 of file InlineAsm.h.
Referenced by llvm::ConstantKeyData< InlineAsm >::getValType().
Definition at line 233 of file InlineAsm.h.
Referenced by llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands().
|
inlinestatic |
getFlagWordForMatchingOp - Augment an existing flag word returned by getFlagWord with information indicating that this input operand is tied to a previous output operand.
Definition at line 242 of file InlineAsm.h.
|
inlinestatic |
getFlagWordForRegClass - Augment an existing flag word returned by getFlagWord with the required register class for the following register operands. A tied use operand cannot have a register class, use the register class from the def operand instead.
Definition at line 254 of file InlineAsm.h.
FunctionType * InlineAsm::getFunctionType | ( | ) | const |
getFunctionType - InlineAsm's are always pointers to functions.
Definition at line 55 of file InlineAsm.cpp.
References llvm::SequentialType::getElementType(), and getType().
Definition at line 262 of file InlineAsm.h.
Referenced by llvm::MachineInstr::getRegClassConstraint(), isClobberKind(), isImmKind(), isMemKind(), isRegDefEarlyClobberKind(), isRegDefKind(), llvm::HexagonTargetLowering::LowerINLINEASM(), and llvm::MachineInstr::print().
getNumOperandRegisters - Extract the number of registers field from the inline asm operand flag.
Definition at line 278 of file InlineAsm.h.
Referenced by EmitGCCInlineAsmStr(), EmitMSInlineAsmStr(), llvm::MachineInstr::findInlineAsmFlagIdx(), llvm::MachineInstr::findTiedOperandIdx(), llvm::HexagonTargetLowering::LowerINLINEASM(), llvm::MachineInstr::print(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), and llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands().
|
inline |
getType - InlineAsm's are always pointers.
Definition at line 78 of file InlineAsm.h.
References llvm::Value::getType().
Referenced by getFunctionType().
hasRegClassConstraint - Returns true if the flag contains a register class constraint. Sets RC to the register class ID.
Definition at line 293 of file InlineAsm.h.
Referenced by llvm::MachineInstr::getRegClassConstraint(), llvm::MachineInstr::print(), and llvm::ARMAsmPrinter::PrintAsmOperand().
|
inline |
Definition at line 72 of file InlineAsm.h.
Referenced by llvm::ConstantKeyData< InlineAsm >::getValType().
|
inline |
Definition at line 73 of file InlineAsm.h.
Referenced by llvm::ConstantKeyData< InlineAsm >::getValType().
Definition at line 272 of file InlineAsm.h.
References getKind().
Definition at line 267 of file InlineAsm.h.
References getKind().
Definition at line 268 of file InlineAsm.h.
References getKind().
Referenced by EmitGCCInlineAsmStr(), EmitMSInlineAsmStr(), and llvm::SelectionDAGISel::SelectInlineAsmMemoryOperands().
Definition at line 269 of file InlineAsm.h.
References getKind().
Definition at line 266 of file InlineAsm.h.
References getKind().
isUseOperandTiedToDef - Return true if the flag of the inline asm operand indicates it is an use operand that's matched to a def operand.
Definition at line 284 of file InlineAsm.h.
Referenced by llvm::MachineInstr::findTiedOperandIdx(), llvm::MachineInstr::print(), and llvm::ARMAsmPrinter::PrintAsmOperand().
|
inline |
Definition at line 200 of file InlineAsm.h.
|
static |
ParseConstraints - Split up the constraint string into the specific constraints and their prefixes. If this returns an empty vector, and if the constraint string itself isn't empty, there was an error parsing.
Definition at line 213 of file InlineAsm.cpp.
References llvm::StringRef::begin(), llvm::StringRef::end(), I, and llvm::InlineAsm::ConstraintInfo::Parse().
Referenced by llvm::X86TargetLowering::ExpandInlineAsm(), and llvm::TargetLowering::ParseConstraints().
|
inline |
ParseConstraints - Parse the constraints of this inlineasm object, returning them the same way that ParseConstraints(str) does.
Definition at line 187 of file InlineAsm.h.
Referenced by Verify().
|
static |
Verify - This static method can be used by the parser to check to see if the specified constraint string is legal for the type. This returns true if legal, false if not.
Verify - Verify that the specified constraint string is reasonable for the specified function type, and otherwise validate the constraint string.
Definition at line 246 of file InlineAsm.cpp.
References llvm::dyn_cast(), llvm::StringRef::empty(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getReturnType(), isClobber, isInput, isOutput, llvm::Type::isStructTy(), llvm::FunctionType::isVarArg(), llvm::Type::isVoidTy(), and ParseConstraints().
|
friend |
Definition at line 43 of file InlineAsm.h.
|
friend |
Definition at line 45 of file InlineAsm.h.