LLVM 22.0.0git
|
#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. | |
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.
|
default |
Default constructor.
References LLVM_ABI.
Referenced by llvm::TargetLowering::AsmOperandInfo::AsmOperandInfo().
|
inline |
Whether this constraint corresponds to an argument.
Definition at line 181 of file InlineAsm.h.
References isIndirect, llvm::InlineAsm::isInput, llvm::InlineAsm::isOutput, and Type.
|
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().
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 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.
void InlineAsm::ConstraintInfo::selectAlternative | ( | unsigned | index | ) |
selectAlternative - Point this constraint to the alternative constraint indicated by the index.
Definition at line 225 of file InlineAsm.cpp.
References Codes, llvm::InlineAsm::SubConstraintInfo::Codes, currentAlternativeIndex, MatchingInput, llvm::InlineAsm::SubConstraintInfo::MatchingInput, and multipleAlternatives.
ConstraintCodeVector llvm::InlineAsm::ConstraintInfo::Codes |
Code - The constraint code, either the register name (in braces) or the constraint letter/number.
Definition at line 156 of file InlineAsm.h.
Referenced by Parse(), and selectAlternative().
unsigned llvm::InlineAsm::ConstraintInfo::currentAlternativeIndex = 0 |
The currently selected alternative constraint index.
Definition at line 166 of file InlineAsm.h.
Referenced by Parse(), and selectAlternative().
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().
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().
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.
bool llvm::InlineAsm::ConstraintInfo::isMultipleAlternative = false |
isMultipleAlternative - '|': has multiple-alternative constraints.
Definition at line 159 of file InlineAsm.h.
Referenced by Parse().
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().
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 163 of file InlineAsm.h.
Referenced by Parse(), and selectAlternative().
ConstraintPrefix llvm::InlineAsm::ConstraintInfo::Type = isInput |
Type - The basic type of the constraint: input/output/clobber/label.
Definition at line 128 of file InlineAsm.h.