LLVM API Documentation

Public Member Functions | Public Attributes
llvm::InlineAsm::ConstraintInfo Struct Reference

#include <InlineAsm.h>

Inheritance diagram for llvm::InlineAsm::ConstraintInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::InlineAsm::ConstraintInfo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool hasMatchingInput () const
 ConstraintInfo ()
 Default constructor.
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.
SubConstraintInfoVector multipleAlternatives
unsigned currentAlternativeIndex
 The currently selected alternative constraint index.

Detailed Description

Definition at line 117 of file InlineAsm.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 60 of file InlineAsm.cpp.


Member Function Documentation

hasMatchingInput - Return true if this is an output constraint that has a matching input constraint.

Definition at line 134 of file InlineAsm.h.

References MatchingInput.

Referenced by ChooseConstraint(), and llvm::TargetLowering::ParseConstraints().

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 70 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().

selectAlternative - Point this constraint to the alternative constraint indicated by the index.

Definition at line 196 of file InlineAsm.cpp.

References llvm::InlineAsm::SubConstraintInfo::Codes, and llvm::InlineAsm::SubConstraintInfo::MatchingInput.

Referenced by llvm::TargetLowering::ParseConstraints().


Member Data Documentation

Code - The constraint code, either the register name (in braces) or the constraint letter/number.

Definition at line 148 of file InlineAsm.h.

Referenced by ChooseConstraint(), llvm::TargetLowering::ComputeConstraintToUse(), llvm::TargetLowering::getMultipleConstraintMatchWeight(), and llvm::hasInlineAsmMemConstraint().

The currently selected alternative constraint index.

Definition at line 158 of file InlineAsm.h.

isCommutative - This is set to true for a constraint that is commutative with the next operand.

Definition at line 138 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 124 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 144 of file InlineAsm.h.

Referenced by llvm::hasInlineAsmMemConstraint(), and llvm::TargetLowering::ParseConstraints().

isMultipleAlternative - '|': has multiple-alternative constraints.

Definition at line 151 of file InlineAsm.h.

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 130 of file InlineAsm.h.

Referenced by hasMatchingInput(), and llvm::TargetLowering::ParseConstraints().

multipleAlternatives - If there are multiple alternative constraints, this array will contain them. Otherwise it will be empty.

Definition at line 155 of file InlineAsm.h.

Referenced by llvm::TargetLowering::getMultipleConstraintMatchWeight(), and llvm::TargetLowering::ParseConstraints().

Type - The basic type of the constraint: input/output/clobber

Definition at line 120 of file InlineAsm.h.

Referenced by llvm::TargetLowering::ParseConstraints(), and llvm::FunctionLoweringInfo::set().


The documentation for this struct was generated from the following files: