LLVM API Documentation
#include <InlineAsm.h>
Public Member Functions | |
bool | hasMatchingInput () const |
ConstraintInfo () | |
Default constructor. More... | |
ConstraintInfo (const ConstraintInfo &other) | |
Copy constructor. More... | |
bool | Parse (StringRef Str, ConstraintInfoVector &ConstraintsSoFar) |
void | selectAlternative (unsigned index) |
Public Attributes | |
ConstraintPrefix | Type |
bool | isEarlyClobber |
signed char | MatchingInput |
bool | isCommutative |
bool | isIndirect |
ConstraintCodeVector | Codes |
bool | isMultipleAlternative |
isMultipleAlternative - '|': has multiple-alternative constraints. More... | |
SubConstraintInfoVector | multipleAlternatives |
unsigned | currentAlternativeIndex |
The currently selected alternative constraint index. More... | |
Definition at line 121 of file InlineAsm.h.
InlineAsm::ConstraintInfo::ConstraintInfo | ( | ) |
Default constructor.
Definition at line 60 of file InlineAsm.cpp.
InlineAsm::ConstraintInfo::ConstraintInfo | ( | const ConstraintInfo & | other | ) |
Copy constructor.
Definition at line 68 of file InlineAsm.cpp.
|
inline |
hasMatchingInput - Return true if this is an output constraint that has a matching input constraint.
Definition at line 138 of file InlineAsm.h.
References MatchingInput.
Referenced by ChooseConstraint(), and llvm::TargetLowering::ParseConstraints().
bool InlineAsm::ConstraintInfo::Parse | ( | StringRef | Str, |
InlineAsm::ConstraintInfoVector & | ConstraintsSoFar | ||
) |
Parse - Analyze the specified string (e.g. "=*&{eax}") and fill in the fields in this structure. If the constraint string is not understood, return true, otherwise return false.
Parse - Analyze the specified string (e.g. "==&{eax}") and fill in the fields in this structure. If the constraint string is not understood, return true, otherwise return false.
Definition at line 80 of file InlineAsm.cpp.
References llvm::LibFunc::atoi, llvm::StringRef::begin(), llvm::StringRef::count(), llvm::StringRef::end(), I, llvm::InlineAsm::isClobber, llvm::LibFunc::isdigit, llvm::InlineAsm::isInput, llvm::InlineAsm::isOutput, llvm::InlineAsm::SubConstraintInfo::MatchingInput, and N.
Referenced by llvm::InlineAsm::ParseConstraints().
void InlineAsm::ConstraintInfo::selectAlternative | ( | unsigned | index | ) |
selectAlternative - Point this constraint to the alternative constraint indicated by the index.
Definition at line 202 of file InlineAsm.cpp.
References llvm::InlineAsm::SubConstraintInfo::Codes, and llvm::InlineAsm::SubConstraintInfo::MatchingInput.
Referenced by llvm::TargetLowering::ParseConstraints().
ConstraintCodeVector llvm::InlineAsm::ConstraintInfo::Codes |
Code - The constraint code, either the register name (in braces) or the constraint letter/number.
Definition at line 152 of file InlineAsm.h.
Referenced by ChooseConstraint(), llvm::TargetLowering::ComputeConstraintToUse(), llvm::TargetLowering::getMultipleConstraintMatchWeight(), and llvm::hasInlineAsmMemConstraint().
unsigned llvm::InlineAsm::ConstraintInfo::currentAlternativeIndex |
The currently selected alternative constraint index.
Definition at line 162 of file InlineAsm.h.
bool llvm::InlineAsm::ConstraintInfo::isCommutative |
isCommutative - This is set to true for a constraint that is commutative with the next operand.
Definition at line 142 of file InlineAsm.h.
bool llvm::InlineAsm::ConstraintInfo::isEarlyClobber |
isEarlyClobber - "&": output operand writes result before inputs are all read. This is only ever set for an output operand.
Definition at line 128 of file InlineAsm.h.
bool llvm::InlineAsm::ConstraintInfo::isIndirect |
isIndirect - True if this operand is an indirect operand. This means that the address of the source or destination is present in the call instruction, instead of it being returned or passed in explicitly. This is represented with a '*' in the asm string.
Definition at line 148 of file InlineAsm.h.
Referenced by llvm::hasInlineAsmMemConstraint(), and llvm::TargetLowering::ParseConstraints().
bool llvm::InlineAsm::ConstraintInfo::isMultipleAlternative |
isMultipleAlternative - '|': has multiple-alternative constraints.
Definition at line 155 of file InlineAsm.h.
signed char llvm::InlineAsm::ConstraintInfo::MatchingInput |
MatchingInput - If this is not -1, this is an output constraint where an input constraint is required to match it (e.g. "0"). The value is the constraint number that matches this one (for example, if this is constraint #0 and constraint #4 has the value "0", this will be 4).
Definition at line 134 of file InlineAsm.h.
Referenced by hasMatchingInput(), and llvm::TargetLowering::ParseConstraints().
SubConstraintInfoVector llvm::InlineAsm::ConstraintInfo::multipleAlternatives |
multipleAlternatives - If there are multiple alternative constraints, this array will contain them. Otherwise it will be empty.
Definition at line 159 of file InlineAsm.h.
Referenced by llvm::TargetLowering::getMultipleConstraintMatchWeight(), and llvm::TargetLowering::ParseConstraints().
ConstraintPrefix llvm::InlineAsm::ConstraintInfo::Type |
Type - The basic type of the constraint: input/output/clobber
Definition at line 124 of file InlineAsm.h.
Referenced by llvm::TargetLowering::ParseConstraints().