LLVM
8.0.1
|
#include "llvm/IR/InlineAsm.h"
Public Member Functions | |
bool | hasMatchingInput () const |
hasMatchingInput - Return true if this is an output constraint that has a matching input constraint. More... | |
ConstraintInfo ()=default | |
Default constructor. More... | |
bool | Parse (StringRef Str, ConstraintInfoVector &ConstraintsSoFar) |
Parse - Analyze the specified string (e.g. More... | |
void | selectAlternative (unsigned index) |
selectAlternative - Point this constraint to the alternative constraint indicated by the index. More... | |
Public Attributes | |
ConstraintPrefix | Type = isInput |
Type - The basic type of the constraint: input/output/clobber. More... | |
bool | isEarlyClobber = false |
isEarlyClobber - "&": output operand writes result before inputs are all read. More... | |
int | MatchingInput = -1 |
MatchingInput - If this is not -1, this is an output constraint where an input constraint is required to match it (e.g. More... | |
bool | isCommutative = false |
isCommutative - This is set to true for a constraint that is commutative with the next operand. More... | |
bool | isIndirect = false |
isIndirect - True if this operand is an indirect operand. More... | |
ConstraintCodeVector | Codes |
Code - The constraint code, either the register name (in braces) or the constraint letter/number. More... | |
bool | isMultipleAlternative = false |
isMultipleAlternative - '|': has multiple-alternative constraints. More... | |
SubConstraintInfoVector | multipleAlternatives |
multipleAlternatives - If there are multiple alternative constraints, this array will contain them. More... | |
unsigned | currentAlternativeIndex = 0 |
The currently selected alternative constraint index. More... | |
Definition at line 118 of file InlineAsm.h.
|
default |
Default constructor.
|
inline |
hasMatchingInput - Return true if this is an output constraint that has a matching input constraint.
Definition at line 135 of file InlineAsm.h.
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.
"==&{eax}") and fill in the fields in this structure. If the constraint string is not understood, return true, otherwise return false.
Definition at line 64 of file InlineAsm.cpp.
References assert(), llvm::StringRef::begin(), llvm::StringRef::count(), E, llvm::StringRef::end(), llvm::find(), I, isInput(), 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 197 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 149 of file InlineAsm.h.
Referenced by asmClobbersCTR(), ChooseConstraint(), llvm::TargetLowering::ComputeConstraintToUse(), llvm::TargetLowering::getMultipleConstraintMatchWeight(), and llvm::hasInlineAsmMemConstraint().
unsigned llvm::InlineAsm::ConstraintInfo::currentAlternativeIndex = 0 |
The currently selected alternative constraint index.
Definition at line 159 of file InlineAsm.h.
isCommutative - This is set to true for a constraint that is commutative with the next operand.
Definition at line 139 of file InlineAsm.h.
isEarlyClobber - "&": output operand writes result before inputs are all read.
This is only ever set for an output operand.
Definition at line 125 of file InlineAsm.h.
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 145 of file InlineAsm.h.
Referenced by llvm::hasInlineAsmMemConstraint(), IsNonLocalValue(), IsOperandAMemoryOperand(), and llvm::TargetLowering::ParseConstraints().
isMultipleAlternative - '|': has multiple-alternative constraints.
Definition at line 152 of file InlineAsm.h.
int llvm::InlineAsm::ConstraintInfo::MatchingInput = -1 |
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 131 of file InlineAsm.h.
Referenced by 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 156 of file InlineAsm.h.
Referenced by llvm::TargetLowering::getMultipleConstraintMatchWeight(), and llvm::TargetLowering::ParseConstraints().
ConstraintPrefix llvm::InlineAsm::ConstraintInfo::Type = isInput |
Type - The basic type of the constraint: input/output/clobber.
Definition at line 121 of file InlineAsm.h.
Referenced by asmClobbersCTR(), findMatchingInlineAsmOperand(), IsNonLocalValue(), and llvm::TargetLowering::ParseConstraints().