LLVM: llvm::InlineAsm::ConstraintInfo Struct Reference (original) (raw)
#include "[llvm/IR/InlineAsm.h](InlineAsm%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| bool | hasMatchingInput () const |
| hasMatchingInput - Return true if this is an output constraint that has a matching input constraint. | |
| ConstraintInfo ()=default | |
| Default constructor. | |
| LLVM_ABI bool | Parse (StringRef Str, ConstraintInfoVector &ConstraintsSoFar) |
| Parse - Analyze the specified string (e.g. | |
| LLVM_ABI void | selectAlternative (unsigned index) |
| selectAlternative - Point this constraint to the alternative constraint indicated by the index. | |
| bool | hasArg () const |
| Whether this constraint corresponds to an argument. |
| Public Attributes | |
|---|---|
| ConstraintPrefix | Type = isInput |
| Type - The basic type of the constraint: input/output/clobber/label. | |
| bool | isEarlyClobber = false |
| isEarlyClobber - "&": output operand writes result before inputs are all read. | |
| 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. | |
| bool | isCommutative = false |
| isCommutative - This is set to true for a constraint that is commutative with the next operand. | |
| bool | isIndirect = false |
| isIndirect - True if this operand is an indirect operand. | |
| ConstraintCodeVector | Codes |
| Code - The constraint code, either the register name (in braces) or the constraint letter/number. | |
| bool | isMultipleAlternative = false |
| isMultipleAlternative - '|': has multiple-alternative constraints. | |
| SubConstraintInfoVector | multipleAlternatives |
| multipleAlternatives - If there are multiple alternative constraints, this array will contain them. | |
| unsigned | currentAlternativeIndex = 0 |
| The currently selected alternative constraint index. |
Definition at line 125 of file InlineAsm.h.
| llvm::InlineAsm::ConstraintInfo::ConstraintInfo ( ) | default |
|---|
◆ hasArg()
| bool llvm::InlineAsm::ConstraintInfo::hasArg ( ) const | inline |
|---|
◆ hasMatchingInput()
| bool llvm::InlineAsm::ConstraintInfo::hasMatchingInput ( ) const | inline |
|---|
hasMatchingInput - Return true if this is an output constraint that has a matching input constraint.
Definition at line 142 of file InlineAsm.h.
References MatchingInput.
Referenced by Parse().
◆ Parse()
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 79 of file InlineAsm.cpp.
References assert(), llvm::CallingConv::C, Codes, currentAlternativeIndex, hasMatchingInput(), I, llvm::InlineAsm::isClobber, isCommutative, isEarlyClobber, isIndirect, llvm::InlineAsm::isInput, llvm::InlineAsm::isLabel, isMultipleAlternative, llvm::InlineAsm::isOutput, MatchingInput, llvm::InlineAsm::SubConstraintInfo::MatchingInput, multipleAlternatives, N, and Type.
◆ selectAlternative()
| void InlineAsm::ConstraintInfo::selectAlternative | ( | unsigned | index | ) |
|---|
◆ Codes
◆ currentAlternativeIndex
unsigned llvm::InlineAsm::ConstraintInfo::currentAlternativeIndex = 0
◆ isCommutative
bool llvm::InlineAsm::ConstraintInfo::isCommutative = false
isCommutative - This is set to true for a constraint that is commutative with the next operand.
Definition at line 146 of file InlineAsm.h.
Referenced by Parse().
◆ isEarlyClobber
bool llvm::InlineAsm::ConstraintInfo::isEarlyClobber = false
isEarlyClobber - "&": output operand writes result before inputs are all read.
This is only ever set for an output operand.
Definition at line 132 of file InlineAsm.h.
Referenced by Parse().
◆ isIndirect
bool llvm::InlineAsm::ConstraintInfo::isIndirect = false
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 152 of file InlineAsm.h.
Referenced by hasArg(), and Parse().
◆ isMultipleAlternative
bool llvm::InlineAsm::ConstraintInfo::isMultipleAlternative = false
isMultipleAlternative - '|': has multiple-alternative constraints.
Definition at line 159 of file InlineAsm.h.
Referenced by Parse().
◆ MatchingInput
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 138 of file InlineAsm.h.
Referenced by hasMatchingInput(), Parse(), and selectAlternative().
◆ multipleAlternatives
multipleAlternatives - If there are multiple alternative constraints, this array will contain them.
Otherwise it will be empty.
Definition at line 163 of file InlineAsm.h.
Referenced by Parse(), and selectAlternative().
◆ Type
The documentation for this struct was generated from the following files:
- include/llvm/IR/InlineAsm.h
- lib/IR/InlineAsm.cpp