LLVM API Documentation

llvm::InlineAsm::ConstraintInfo Struct Reference

#include <InlineAsm.h>

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

List of all members.

Public Member Functions

bool hasMatchingInput () const
bool Parse (const std::string &Str, std::vector< InlineAsm::ConstraintInfo > &ConstraintsSoFar)

Public Attributes

ConstraintPrefix Type
bool isEarlyClobber
signed char MatchingInput
bool isCommutative
bool isIndirect
std::vector< std::string > Codes


Detailed Description

Definition at line 73 of file InlineAsm.h.


Member Function Documentation

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

References MatchingInput.

Referenced by llvm::SelectionDAGLowering::GetRegistersForValue(), and Parse().

bool InlineAsm::ConstraintInfo::Parse ( const std::string &  Str,
std::vector< InlineAsm::ConstraintInfo > &  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 53 of file InlineAsm.cpp.

References Codes, E, hasMatchingInput(), llvm::InlineAsm::isClobber, isCommutative, isEarlyClobber, isIndirect, llvm::InlineAsm::isInput, llvm::InlineAsm::isOutput, and MatchingInput.

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


Member Data Documentation

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

Definition at line 76 of file InlineAsm.h.

Referenced by llvm::SelectionDAGLowering::GetRegistersForValue(), and IsOperandAMemoryOperand().

isEarlyClobber - "&": output operand writes result before inputs are all read. This is only ever set for an output operand.

Definition at line 80 of file InlineAsm.h.

Referenced by Parse().

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

Referenced by hasMatchingInput(), and Parse().

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

Definition at line 94 of file InlineAsm.h.

Referenced by Parse().

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

Referenced by IsOperandAMemoryOperand(), and Parse().

std::vector<std::string> llvm::InlineAsm::ConstraintInfo::Codes

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

Definition at line 104 of file InlineAsm.h.

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


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