clang  16.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
clang::TargetInfo::ConstraintInfo Struct Reference

#include "clang/Basic/TargetInfo.h"

Collaboration diagram for clang::TargetInfo::ConstraintInfo:
Collaboration graph
[legend]

Public Types

enum  {
  CI_None = 0x00, CI_AllowsMemory = 0x01, CI_AllowsRegister = 0x02, CI_ReadWrite = 0x04,
  CI_HasMatchingInput = 0x08, CI_ImmediateConstant = 0x10, CI_EarlyClobber = 0x20
}
 

Public Member Functions

 ConstraintInfo (StringRef ConstraintStr, StringRef Name)
 
const std::stringgetConstraintStr () const
 
const std::stringgetName () const
 
bool isReadWrite () const
 
bool earlyClobber ()
 
bool allowsRegister () const
 
bool allowsMemory () const
 
bool hasMatchingInput () const
 Return true if this output operand has a matching (tied) input operand. More...
 
bool hasTiedOperand () const
 Return true if this input operand is a matching constraint that ties it to an output operand. More...
 
unsigned getTiedOperand () const
 
bool requiresImmediateConstant () const
 
bool isValidAsmImmediate (const llvm::APInt &Value) const
 
void setIsReadWrite ()
 
void setEarlyClobber ()
 
void setAllowsMemory ()
 
void setAllowsRegister ()
 
void setHasMatchingInput ()
 
void setRequiresImmediate (int Min, int Max)
 
void setRequiresImmediate (llvm::ArrayRef< int > Exacts)
 
void setRequiresImmediate (int Exact)
 
void setRequiresImmediate ()
 
void setTiedOperand (unsigned N, ConstraintInfo &Output)
 Indicate that this is an input operand that is tied to the specified output operand. More...
 

Public Attributes

unsigned Flags
 
int TiedOperand
 
struct {
   int   Min
 
   int   Max
 
   bool   isConstrained
 
ImmRange
 
llvm::SmallSet< int, 4 > ImmSet
 
std::string ConstraintStr
 
std::string Name
 

Detailed Description

Definition at line 1026 of file TargetInfo.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
CI_None 
CI_AllowsMemory 
CI_AllowsRegister 
CI_ReadWrite 
CI_HasMatchingInput 
CI_ImmediateConstant 
CI_EarlyClobber 

Definition at line 1027 of file TargetInfo.h.

Constructor & Destructor Documentation

◆ ConstraintInfo()

clang::TargetInfo::ConstraintInfo::ConstraintInfo ( StringRef  ConstraintStr,
StringRef  Name 
)
inline

Definition at line 1048 of file TargetInfo.h.

References ImmRange.

Member Function Documentation

◆ allowsMemory()

bool clang::TargetInfo::ConstraintInfo::allowsMemory ( ) const
inline

Definition at line 1060 of file TargetInfo.h.

References CI_AllowsMemory, and Flags.

Referenced by clang::Sema::ActOnGCCAsmStmt().

◆ allowsRegister()

bool clang::TargetInfo::ConstraintInfo::allowsRegister ( ) const
inline

Definition at line 1059 of file TargetInfo.h.

References CI_AllowsRegister, and Flags.

Referenced by clang::Sema::ActOnGCCAsmStmt(), and AddVariableConstraints().

◆ earlyClobber()

bool clang::TargetInfo::ConstraintInfo::earlyClobber ( )
inline

Definition at line 1058 of file TargetInfo.h.

References CI_EarlyClobber, and Flags.

◆ getConstraintStr()

const std::string& clang::TargetInfo::ConstraintInfo::getConstraintStr ( ) const
inline

Definition at line 1055 of file TargetInfo.h.

References ConstraintStr.

Referenced by clang::Sema::ActOnGCCAsmStmt().

◆ getName()

const std::string& clang::TargetInfo::ConstraintInfo::getName ( ) const
inline

Definition at line 1056 of file TargetInfo.h.

References Name.

◆ getTiedOperand()

unsigned clang::TargetInfo::ConstraintInfo::getTiedOperand ( ) const
inline

Definition at line 1072 of file TargetInfo.h.

References hasTiedOperand(), and TiedOperand.

Referenced by clang::Sema::ActOnGCCAsmStmt().

◆ hasMatchingInput()

bool clang::TargetInfo::ConstraintInfo::hasMatchingInput ( ) const
inline

Return true if this output operand has a matching (tied) input operand.

Definition at line 1064 of file TargetInfo.h.

References CI_HasMatchingInput, and Flags.

◆ hasTiedOperand()

bool clang::TargetInfo::ConstraintInfo::hasTiedOperand ( ) const
inline

Return true if this input operand is a matching constraint that ties it to an output operand.

If this returns true then getTiedOperand will indicate which output operand this is tied to.

Definition at line 1071 of file TargetInfo.h.

References TiedOperand.

Referenced by clang::Sema::ActOnGCCAsmStmt(), and getTiedOperand().

◆ isReadWrite()

bool clang::TargetInfo::ConstraintInfo::isReadWrite ( ) const
inline

Definition at line 1057 of file TargetInfo.h.

References CI_ReadWrite, and Flags.

◆ isValidAsmImmediate()

bool clang::TargetInfo::ConstraintInfo::isValidAsmImmediate ( const llvm::APInt &  Value) const
inline

Definition at line 1080 of file TargetInfo.h.

References ImmRange, and ImmSet.

Referenced by clang::Sema::ActOnGCCAsmStmt().

◆ requiresImmediateConstant()

bool clang::TargetInfo::ConstraintInfo::requiresImmediateConstant ( ) const
inline

Definition at line 1077 of file TargetInfo.h.

References CI_ImmediateConstant, and Flags.

Referenced by clang::Sema::ActOnGCCAsmStmt().

◆ setAllowsMemory()

void clang::TargetInfo::ConstraintInfo::setAllowsMemory ( )
inline

Definition at line 1089 of file TargetInfo.h.

References CI_AllowsMemory, and Flags.

◆ setAllowsRegister()

void clang::TargetInfo::ConstraintInfo::setAllowsRegister ( )
inline

Definition at line 1090 of file TargetInfo.h.

References CI_AllowsRegister, and Flags.

◆ setEarlyClobber()

void clang::TargetInfo::ConstraintInfo::setEarlyClobber ( )
inline

Definition at line 1088 of file TargetInfo.h.

References CI_EarlyClobber, and Flags.

◆ setHasMatchingInput()

void clang::TargetInfo::ConstraintInfo::setHasMatchingInput ( )
inline

Definition at line 1091 of file TargetInfo.h.

References CI_HasMatchingInput, and Flags.

Referenced by setTiedOperand().

◆ setIsReadWrite()

void clang::TargetInfo::ConstraintInfo::setIsReadWrite ( )
inline

Definition at line 1087 of file TargetInfo.h.

References CI_ReadWrite, and Flags.

◆ setRequiresImmediate() [1/4]

void clang::TargetInfo::ConstraintInfo::setRequiresImmediate ( )
inline

Definition at line 1107 of file TargetInfo.h.

References CI_ImmediateConstant, and Flags.

◆ setRequiresImmediate() [2/4]

void clang::TargetInfo::ConstraintInfo::setRequiresImmediate ( int  Exact)
inline

Definition at line 1103 of file TargetInfo.h.

References CI_ImmediateConstant, Flags, and ImmSet.

◆ setRequiresImmediate() [3/4]

void clang::TargetInfo::ConstraintInfo::setRequiresImmediate ( int  Min,
int  Max 
)
inline

Definition at line 1092 of file TargetInfo.h.

References CI_ImmediateConstant, Flags, ImmRange, Max, and Min.

◆ setRequiresImmediate() [4/4]

void clang::TargetInfo::ConstraintInfo::setRequiresImmediate ( llvm::ArrayRef< int Exacts)
inline

Definition at line 1098 of file TargetInfo.h.

References CI_ImmediateConstant, Flags, and ImmSet.

◆ setTiedOperand()

void clang::TargetInfo::ConstraintInfo::setTiedOperand ( unsigned  N,
ConstraintInfo Output 
)
inline

Indicate that this is an input operand that is tied to the specified output operand.

Copy over the various constraint information from the output.

Definition at line 1115 of file TargetInfo.h.

References Flags, setHasMatchingInput(), and TiedOperand.

Member Data Documentation

◆ ConstraintStr

std::string clang::TargetInfo::ConstraintInfo::ConstraintStr

Definition at line 1045 of file TargetInfo.h.

Referenced by getConstraintStr().

◆ Flags

unsigned clang::TargetInfo::ConstraintInfo::Flags

◆ ImmRange

struct { ... } clang::TargetInfo::ConstraintInfo::ImmRange

◆ ImmSet

llvm::SmallSet<int, 4> clang::TargetInfo::ConstraintInfo::ImmSet

Definition at line 1043 of file TargetInfo.h.

Referenced by isValidAsmImmediate(), and setRequiresImmediate().

◆ isConstrained

bool clang::TargetInfo::ConstraintInfo::isConstrained

Definition at line 1041 of file TargetInfo.h.

◆ Max

int clang::TargetInfo::ConstraintInfo::Max

Definition at line 1040 of file TargetInfo.h.

Referenced by setRequiresImmediate().

◆ Min

int clang::TargetInfo::ConstraintInfo::Min

Definition at line 1039 of file TargetInfo.h.

Referenced by setRequiresImmediate().

◆ Name

std::string clang::TargetInfo::ConstraintInfo::Name

Definition at line 1046 of file TargetInfo.h.

Referenced by getName().

◆ TiedOperand

int clang::TargetInfo::ConstraintInfo::TiedOperand

Definition at line 1037 of file TargetInfo.h.

Referenced by getTiedOperand(), hasTiedOperand(), and setTiedOperand().


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