16 #ifndef LLVM_IR_INLINEASM_H 17 #define LLVM_IR_INLINEASM_H 42 std::string AsmString, Constraints;
54 void destroyConstant();
125 bool isEarlyClobber =
false;
139 bool isCommutative =
false;
145 bool isIndirect =
false;
152 bool isMultipleAlternative =
false;
159 unsigned currentAlternativeIndex = 0;
171 void selectAlternative(
unsigned index);
187 return V->
getValueID() == Value::InlineAsmVal;
270 assert(((NumOps << 3) & ~0xffff) == 0 &&
"Too many inline asm operands!");
272 return Kind | (NumOps << 3);
289 unsigned MatchedOperandNo) {
290 assert(MatchedOperandNo <= 0x7fff &&
"Too big matched operand");
291 assert((InputFlag & ~0xffff) == 0 &&
"High bits already contain data");
303 assert(!
isImmKind(InputFlag) &&
"Immediates cannot have a register class");
304 assert(!
isMemKind(InputFlag) &&
"Memory operand cannot have a register class");
305 assert(RC <= 0x7fff &&
"Too large register class ID");
306 assert((InputFlag & ~0xffff) == 0 &&
"High bits already contain data");
307 return InputFlag | (RC << 16);
313 assert(
isMemKind(InputFlag) &&
"InputFlag is not a memory constraint!");
314 assert(Constraint <= 0x7fff &&
"Too large a memory constraint ID");
316 assert((InputFlag & ~0xffff) == 0 &&
"High bits already contain data");
337 return (Flag & 0xffff) >> 3;
345 Idx = (Flag & ~Flag_MatchingOperand) >> 16;
354 unsigned High = Flag >> 16;
366 #endif // LLVM_IR_INLINEASM_H
unsigned getValueID() const
Return an ID for the concrete type of this object.
This class represents lattice values for constants.
static unsigned getFlagWord(unsigned Kind, unsigned NumOps)
const std::string & getAsmString() const
static bool isClobberKind(unsigned Flag)
static bool isImmKind(unsigned Flag)
static bool isUseOperandTiedToDef(unsigned Flag, unsigned &Idx)
isUseOperandTiedToDef - Return true if the flag of the inline asm operand indicates it is an use oper...
bool hasMatchingInput() const
hasMatchingInput - Return true if this is an output constraint that has a matching input constraint...
ConstraintCodeVector Codes
Code - The constraint code, either the register name (in braces) or the constraint letter/number...
bool hasSideEffects() const
SubConstraintInfo()=default
Default constructor.
std::vector< std::string > ConstraintCodeVector
static unsigned getFlagWordForRegClass(unsigned InputFlag, unsigned RC)
getFlagWordForRegClass - Augment an existing flag word returned by getFlagWord with the required regi...
static bool isRegDefEarlyClobberKind(unsigned Flag)
static unsigned convertMemFlagWordToMatchingFlagWord(unsigned InputFlag)
Class to represent function types.
Type * getType() const
All values are typed, get the type of this value.
static bool Verify(FunctionType *Ty, StringRef Constraints)
Verify - This static method can be used by the parser to check to see if the specified constraint str...
InlineAsm & operator=(const InlineAsm &)=delete
static bool isRegDefKind(unsigned Flag)
Class to represent pointers.
Flag
These should be considered private to the implementation of the MCInstrDesc class.
static bool classof(const Value *V)
The instances of the Type class are immutable: once they are created, they are never changed...
SubConstraintInfoVector multipleAlternatives
multipleAlternatives - If there are multiple alternative constraints, this array will contain them...
static unsigned getNumOperandRegisters(unsigned Flag)
getNumOperandRegisters - Extract the number of registers field from the inline asm operand flag...
static unsigned getMemoryConstraintID(unsigned Flag)
static unsigned getKind(unsigned Flags)
static unsigned getFlagWordForMem(unsigned InputFlag, unsigned Constraint)
Augment an existing flag word returned by getFlagWord with the constraint code for a memory constrain...
static bool isMemKind(unsigned Flag)
bool isAlignStack() const
const std::string & getConstraintString() const
std::vector< ConstraintInfo > ConstraintInfoVector
ConstraintCodeVector Codes
Code - The constraint code, either the register name (in braces) or the constraint letter/number...
PointerType * getType() const
getType - InlineAsm's are always pointers.
static bool hasRegClassConstraint(unsigned Flag, unsigned &RC)
hasRegClassConstraint - Returns true if the flag contains a register class constraint.
FunctionType * getFunctionType() const
getFunctionType - InlineAsm's are always pointers to functions.
AsmDialect getDialect() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
int MatchingInput
MatchingInput - If this is not -1, this is an output constraint where an input constraint is required...
StringRef - Represent a constant reference to a string, i.e.
std::vector< SubConstraintInfo > SubConstraintInfoVector
ConstraintInfoVector ParseConstraints() const
ParseConstraints - Parse the constraints of this inlineasm object, returning them the same way that P...
static unsigned getFlagWordForMatchingOp(unsigned InputFlag, unsigned MatchedOperandNo)
getFlagWordForMatchingOp - Augment an existing flag word returned by getFlagWord with information ind...