LLVM  14.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::TargetLowering::AsmOperandInfo Struct Reference

This contains information for each constraint that we are lowering. More...

#include "llvm/CodeGen/TargetLowering.h"

Inheritance diagram for llvm::TargetLowering::AsmOperandInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::TargetLowering::AsmOperandInfo:
Collaboration graph
[legend]

Public Member Functions

 AsmOperandInfo (InlineAsm::ConstraintInfo Info)
 Copy constructor for copying from a ConstraintInfo. More...
 
bool isMatchingInputConstraint () const
 Return true of this is an input operand that is a matching constraint like "4". More...
 
unsigned getMatchedOperand () const
 If this is an input matching constraint, this method returns the output operand it matches. More...
 
- Public Member Functions inherited from llvm::InlineAsm::ConstraintInfo
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

std::string ConstraintCode
 This contains the actual string for the code, like "m". More...
 
TargetLowering::ConstraintType ConstraintType = TargetLowering::C_Unknown
 Information about the constraint code, e.g. More...
 
ValueCallOperandVal = nullptr
 If this is the result output operand or a clobber, this is null, otherwise it is the incoming operand to the CallInst. More...
 
MVT ConstraintVT = MVT::Other
 The ValueType for the operand value. More...
 
- Public Attributes inherited from llvm::InlineAsm::ConstraintInfo
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...
 

Detailed Description

This contains information for each constraint that we are lowering.

Definition at line 4189 of file TargetLowering.h.

Constructor & Destructor Documentation

◆ AsmOperandInfo()

llvm::TargetLowering::AsmOperandInfo::AsmOperandInfo ( InlineAsm::ConstraintInfo  Info)
inline

Copy constructor for copying from a ConstraintInfo.

Definition at line 4208 of file TargetLowering.h.

Member Function Documentation

◆ getMatchedOperand()

unsigned TargetLowering::AsmOperandInfo::getMatchedOperand ( ) const

If this is an input matching constraint, this method returns the output operand it matches.

Definition at line 4649 of file TargetLowering.cpp.

References assert().

Referenced by llvm::InlineAsmLowering::lowerInlineAsm().

◆ isMatchingInputConstraint()

bool TargetLowering::AsmOperandInfo::isMatchingInputConstraint ( ) const

Return true of this is an input operand that is a matching constraint like "4".

Definition at line 4642 of file TargetLowering.cpp.

References assert().

Referenced by llvm::InlineAsmLowering::lowerInlineAsm().

Member Data Documentation

◆ CallOperandVal

Value* llvm::TargetLowering::AsmOperandInfo::CallOperandVal = nullptr

If this is the result output operand or a clobber, this is null, otherwise it is the incoming operand to the CallInst.

This gets modified as the asm is processed.

Definition at line 4202 of file TargetLowering.h.

Referenced by computeConstraintToUse(), llvm::TargetLowering::ComputeConstraintToUse(), IsOperandAMemoryOperand(), llvm::InlineAsmLowering::lowerInlineAsm(), and llvm::TargetLowering::ParseConstraints().

◆ ConstraintCode

std::string llvm::TargetLowering::AsmOperandInfo::ConstraintCode

This contains the actual string for the code, like "m".

TargetLowering picks the 'best' code from ConstraintInfo::Codes that most closely matches the operand.

Definition at line 4193 of file TargetLowering.h.

Referenced by chooseConstraint(), ChooseConstraint(), computeConstraintToUse(), llvm::TargetLowering::ComputeConstraintToUse(), llvm::X86TargetLowering::LowerAsmOutputForConstraint(), llvm::InlineAsmLowering::lowerInlineAsm(), and llvm::TargetLowering::ParseConstraints().

◆ ConstraintType

TargetLowering::ConstraintType llvm::TargetLowering::AsmOperandInfo::ConstraintType = TargetLowering::C_Unknown

Information about the constraint code, e.g.

Register, RegisterClass, Memory, Other, Unknown.

Definition at line 4197 of file TargetLowering.h.

Referenced by chooseConstraint(), ChooseConstraint(), computeConstraintToUse(), llvm::TargetLowering::ComputeConstraintToUse(), IsOperandAMemoryOperand(), and llvm::InlineAsmLowering::lowerInlineAsm().

◆ ConstraintVT

MVT llvm::TargetLowering::AsmOperandInfo::ConstraintVT = MVT::Other

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