LLVM 24.0.0git
InlineAsm.h
Go to the documentation of this file.
1//===- llvm/InlineAsm.h - Class to represent inline asm strings -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This class represents the inline asm strings, which are Value*'s that are
10// used as the callee operand of call instructions. InlineAsm's are uniqued
11// like constants, and created via InlineAsm::get(...).
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_IR_INLINEASM_H
16#define LLVM_IR_INLINEASM_H
17
18#include "llvm/ADT/Bitfields.h"
20#include "llvm/ADT/StringRef.h"
21#include "llvm/IR/Value.h"
25#include <cassert>
26#include <string>
27#include <vector>
28
29namespace llvm {
30
31class Error;
32class FunctionType;
33class PointerType;
34template <class ConstantClass> class ConstantUniqueMap;
35
36class InlineAsm final : public Value {
37public:
42
43private:
44 friend struct InlineAsmKeyType;
45 friend class ConstantUniqueMap<InlineAsm>;
46
47 std::string AsmString, Constraints;
48 FunctionType *FTy;
49 bool HasSideEffects;
50 bool IsAlignStack;
51 AsmDialect Dialect;
52 bool CanThrow;
53
54 InlineAsm(FunctionType *Ty, const std::string &AsmString,
55 const std::string &Constraints, bool hasSideEffects,
56 bool isAlignStack, AsmDialect asmDialect, bool canThrow);
57
58 /// When the ConstantUniqueMap merges two types and makes two InlineAsms
59 /// identical, it destroys one of them with this method.
60 void destroyConstant();
61
62public:
63 InlineAsm(const InlineAsm &) = delete;
64 InlineAsm &operator=(const InlineAsm &) = delete;
65
66 /// InlineAsm::get - Return the specified uniqued inline asm string.
67 ///
68 LLVM_ABI static InlineAsm *get(FunctionType *Ty, StringRef AsmString,
69 StringRef Constraints, bool hasSideEffects,
70 bool isAlignStack = false,
71 AsmDialect asmDialect = AD_ATT,
72 bool canThrow = false);
73
74 bool hasSideEffects() const { return HasSideEffects; }
75 bool isAlignStack() const { return IsAlignStack; }
76 AsmDialect getDialect() const { return Dialect; }
77 bool canThrow() const { return CanThrow; }
78
79 /// getType - InlineAsm's are always pointers.
80 ///
82 return reinterpret_cast<PointerType*>(Value::getType());
83 }
84
85 /// getFunctionType - InlineAsm's are always pointers to functions.
86 ///
88
89 StringRef getAsmString() const { return AsmString; }
90 StringRef getConstraintString() const { return Constraints; }
92
93 /// This static method can be used by the parser to check to see if the
94 /// specified constraint string is legal for the type.
95 LLVM_ABI static Error verify(FunctionType *Ty, StringRef Constraints);
96
97 // Constraint String Parsing
99 isInput, // 'x'
100 isOutput, // '=x'
101 isClobber, // '~x'
102 isLabel, // '!x'
103 };
104
105 using ConstraintCodeVector = std::vector<std::string>;
106
108 /// MatchingInput - If this is not -1, this is an output constraint where an
109 /// input constraint is required to match it (e.g. "0"). The value is the
110 /// constraint number that matches this one (for example, if this is
111 /// constraint #0 and constraint #4 has the value "0", this will be 4).
113
114 /// Code - The constraint code, either the register name (in braces) or the
115 /// constraint letter/number.
117
118 /// Default constructor.
119 SubConstraintInfo() = default;
120 };
121
122 using SubConstraintInfoVector = std::vector<SubConstraintInfo>;
123 struct ConstraintInfo;
124 using ConstraintInfoVector = std::vector<ConstraintInfo>;
125
127 /// Type - The basic type of the constraint: input/output/clobber/label
128 ///
130
131 /// isEarlyClobber - "&": output operand writes result before inputs are all
132 /// read. This is only ever set for an output operand.
133 bool isEarlyClobber = false;
134
135 /// MatchingInput - If this is not -1, this is an output constraint where an
136 /// input constraint is required to match it (e.g. "0"). The value is the
137 /// constraint number that matches this one (for example, if this is
138 /// constraint #0 and constraint #4 has the value "0", this will be 4).
140
141 /// hasMatchingInput - Return true if this is an output constraint that has
142 /// a matching input constraint.
143 bool hasMatchingInput() const { return MatchingInput != -1; }
144
145 /// isCommutative - This is set to true for a constraint that is commutative
146 /// with the next operand.
147 bool isCommutative = false;
148
149 /// isIndirect - True if this operand is an indirect operand. This means
150 /// that the address of the source or destination is present in the call
151 /// instruction, instead of it being returned or passed in explicitly. This
152 /// is represented with a '*' in the asm string.
153 bool isIndirect = false;
154
155 /// Code - The constraint code, either the register name (in braces) or the
156 /// constraint letter/number.
158
159 /// isMultipleAlternative - '|': has multiple-alternative constraints.
161
162 /// multipleAlternatives - If there are multiple alternative constraints,
163 /// this array will contain them. Otherwise it will be empty.
165
166 /// The currently selected alternative constraint index.
168
169 /// Default constructor.
170 ConstraintInfo() = default;
171
172 /// Parse - Analyze the specified string (e.g. "=*&{eax}") and fill in the
173 /// fields in this structure. If the constraint string is not understood,
174 /// return true, otherwise return false.
175 LLVM_ABI bool Parse(StringRef Str, ConstraintInfoVector &ConstraintsSoFar);
176
177 /// selectAlternative - Point this constraint to the alternative constraint
178 /// indicated by the index.
179 LLVM_ABI void selectAlternative(unsigned index);
180
181 /// Whether this constraint corresponds to an argument.
182 bool hasArg() const {
183 return Type == isInput || (Type == isOutput && isIndirect);
184 }
185 };
186
187 /// ParseConstraints - Split up the constraint string into the specific
188 /// constraints and their prefixes. If this returns an empty vector, and if
189 /// the constraint string itself isn't empty, there was an error parsing.
191 ParseConstraints(StringRef ConstraintString);
192
193 /// ParseConstraints - Parse the constraints of this inlineasm object,
194 /// returning them the same way that ParseConstraints(str) does.
196 return ParseConstraints(Constraints);
197 }
198
199 // Methods for support type inquiry through isa, cast, and dyn_cast:
200 static bool classof(const Value *V) {
201 return V->getValueID() == Value::InlineAsmVal;
202 }
203
204 enum : uint32_t {
205 // Fixed operands on an INLINEASM SDNode.
209 Op_ExtraInfo = 3, // HasSideEffects, IsAlignStack, AsmDialect.
211
212 // Fixed operands on an INLINEASM MachineInstr.
214 MIOp_ExtraInfo = 1, // HasSideEffects, IsAlignStack, AsmDialect.
216
217 // Interpretation of the MIOp_ExtraInfo bit field.
225 };
226
227 // Inline asm operands map to multiple SDNode / MachineInstr operands.
228 // The first operand is an immediate describing the asm operand, the low
229 // bits is the kind:
230 enum class Kind : uint8_t {
231 RegUse = 1, // Input register, "r".
232 RegDef = 2, // Output register, "=r".
233 RegDefEarlyClobber = 3, // Early-clobber output register, "=&r".
234 Clobber = 4, // Clobbered register, "~r".
235 Imm = 5, // Immediate.
236 Mem = 6, // Memory operand, "m", or an address, "p".
237 Func = 7, // Address operand of function call
238 };
239
240 // Memory constraint codes.
241 // Addresses are included here as they need to be treated the same by the
242 // backend, the only difference is that they are not used to actaully
243 // access memory by the instruction.
269
270 // Address constraints
276
277 // AMDGPU-specific constraints
279
281 };
282
283 // This class is intentionally packed into a 32b value as it is used as a
284 // MVT::i32 ConstantSDNode SDValue for SelectionDAG and as immediate operands
285 // on INLINEASM and INLINEASM_BR MachineInstr's.
286 //
287 // The encoding of Flag is currently:
288 // Bits 2-0 - A Kind::* value indicating the kind of the operand.
289 // (KindField)
290 // Bits 15-3 - The number of SDNode operands associated with this inline
291 // assembly operand. Once lowered to MIR, this represents the
292 // number of MachineOperands necessary to refer to a
293 // MachineOperandType::MO_FrameIndex. (NumOperands)
294 // Bit 31 - Determines if this is a matched operand. (IsMatched)
295 // If bit 31 is set:
296 // Bits 30-16 - The operand number that this operand must match.
297 // (MatchedOperandNo)
298 // Else if bits 2-0 are Kind::Mem:
299 // Bits 30-16 - A ConstraintCode:: value indicating the original
300 // constraint code. (MemConstraintCode)
301 // Else:
302 // Bits 29-16 - The register class ID to use for the operand. (RegClass)
303 // Bit 30 - If the register is permitted to be spilled.
304 // (RegMayBeFolded)
305 // Defaults to false "r", may be set for constraints like
306 // "rm" (or "g").
307 //
308 // As such, MatchedOperandNo, MemConstraintCode, and
309 // (RegClass+RegMayBeFolded) are views of the same slice of bits, but are
310 // mutually exclusive depending on the fields IsMatched then KindField.
311 class Flag {
312 uint32_t Storage;
314 using NumOperands = Bitfield::Element<unsigned, 3, 13>;
315 using MatchedOperandNo = Bitfield::Element<unsigned, 16, 15>;
318 using RegMayBeFolded = Bitfield::Element<bool, 30, 1>;
319 using IsMatched = Bitfield::Element<bool, 31, 1>;
320
321
322 unsigned getMatchedOperandNo() const { return Bitfield::get<MatchedOperandNo>(Storage); }
323 unsigned getRegClass() const { return Bitfield::get<RegClass>(Storage); }
324 bool isMatched() const { return Bitfield::get<IsMatched>(Storage); }
325
326 public:
327 Flag() : Storage(0) {}
328 explicit Flag(uint32_t F) : Storage(F) {}
329 Flag(enum Kind K, unsigned NumOps) : Storage(0) {
330 Bitfield::set<KindField>(Storage, K);
332 }
333 operator uint32_t() { return Storage; }
334 Kind getKind() const { return Bitfield::get<KindField>(Storage); }
335 bool isRegUseKind() const { return getKind() == Kind::RegUse; }
336 bool isRegDefKind() const { return getKind() == Kind::RegDef; }
339 }
340 bool isClobberKind() const { return getKind() == Kind::Clobber; }
341 bool isImmKind() const { return getKind() == Kind::Imm; }
342 bool isMemKind() const { return getKind() == Kind::Mem; }
343 bool isFuncKind() const { return getKind() == Kind::Func; }
345 switch (getKind()) {
346 case Kind::RegUse:
347 return "reguse";
348 case Kind::RegDef:
349 return "regdef";
351 return "regdef-ec";
352 case Kind::Clobber:
353 return "clobber";
354 case Kind::Imm:
355 return "imm";
356 case Kind::Mem:
357 case Kind::Func:
358 return "mem";
359 }
360 llvm_unreachable("impossible kind");
361 }
362
363 /// getNumOperandRegisters - Extract the number of registers field from the
364 /// inline asm operand flag.
365 unsigned getNumOperandRegisters() const {
366 return Bitfield::get<NumOperands>(Storage);
367 }
368
369 /// The largest number of operands that a flag can describe.
370 static constexpr unsigned getMaxNumOperandRegisters() {
372 }
373
374 /// Set the number of operands that follow the flag. (The MIR parser reads
375 /// the count last, so it can't pass it to the constructor.)
378 "Too many operands for a flag");
380 }
381
382 /// isUseOperandTiedToDef - Return true if the flag of the inline asm
383 /// operand indicates it is an use operand that's matched to a def operand.
384 bool isUseOperandTiedToDef(unsigned &Idx) const {
385 if (!isMatched())
386 return false;
387 Idx = getMatchedOperandNo();
388 return true;
389 }
390
391 /// hasRegClassConstraint - Returns true if the flag contains a register
392 /// class constraint. Sets RC to the register class ID.
393 bool hasRegClassConstraint(unsigned &RC) const {
394 if (isMatched())
395 return false;
396 // setRegClass() uses 0 to mean no register class, and otherwise stores
397 // RC + 1.
398 if (!getRegClass())
399 return false;
400 RC = getRegClass() - 1;
401 return true;
402 }
403
405 assert((isMemKind() || isFuncKind()) &&
406 "Not expected mem or function flag!");
407 return Bitfield::get<MemConstraintCode>(Storage);
408 }
409
410 /// setMatchingOp - Augment an existing flag with information indicating
411 /// that this input operand is tied to a previous output operand.
412 void setMatchingOp(unsigned OperandNo) {
413 assert(getMatchedOperandNo() == 0 && "Matching operand already set");
414 Bitfield::set<MatchedOperandNo>(Storage, OperandNo);
415 Bitfield::set<IsMatched>(Storage, true);
416 }
417
418 /// setRegClass - Augment an existing flag with the required register class
419 /// for the following register operands. A tied use operand cannot have a
420 /// register class, use the register class from the def operand instead.
421 void setRegClass(unsigned RC) {
422 assert(!isImmKind() && "Immediates cannot have a register class");
423 assert(!isMemKind() && "Memory operand cannot have a register class");
424 assert(getRegClass() == 0 && "Register class already set");
425 // Store RC + 1, reserve the value 0 to mean 'no register class'.
426 Bitfield::set<RegClass>(Storage, RC + 1);
427 }
428
429 /// setMemConstraint - Augment an existing flag with the constraint code for
430 /// a memory constraint.
432 assert(getMemoryConstraintID() == ConstraintCode::Unknown && "Mem constraint already set");
434 }
435 /// clearMemConstraint - Similar to setMemConstraint(0), but without the
436 /// assertion checking that the constraint has not been set previously.
438 assert((isMemKind() || isFuncKind()) &&
439 "Flag is not a memory or function constraint!");
441 }
442
443 /// Set a bit to denote that while this operand is some kind of register
444 /// (use, def, ...), a memory flag did appear in the original constraint
445 /// list. This is set by the instruction selection framework, and consumed
446 /// by the register allocator. While the register allocator is generally
447 /// responsible for spilling registers, we need to be able to distinguish
448 /// between registers that the register allocator has permission to fold
449 /// ("rm") vs ones it does not ("r"). This is because the inline asm may use
450 /// instructions which don't support memory addressing modes for that
451 /// operand.
452 ///
453 /// A tied use can't be foldable: it stores its matched operand number in
454 /// the bits that otherwise hold RegMayBeFolded.
455 void setRegMayBeFolded(bool B) {
457 "Must be reg");
458 assert(!isMatched() && "Tied operand cannot be marked foldable");
460 }
461 bool getRegMayBeFolded() const {
463 "Must be reg");
464 // Bit 30 of a tied use is part of its matched operand number.
465 if (isMatched())
466 return false;
467 return Bitfield::get<RegMayBeFolded>(Storage);
468 }
469 };
470
471 static AsmDialect getDialect(unsigned ExtraInfo) {
472 return ExtraInfo & Extra_AsmDialect ? AD_Intel : AD_ATT;
473 }
474
475 static std::vector<StringRef> getExtraInfoNames(unsigned ExtraInfo) {
476 std::vector<StringRef> Result;
477 if (ExtraInfo & InlineAsm::Extra_HasSideEffects)
478 Result.push_back("sideeffect");
479 if (ExtraInfo & InlineAsm::Extra_MayLoad)
480 Result.push_back("mayload");
481 if (ExtraInfo & InlineAsm::Extra_MayStore)
482 Result.push_back("maystore");
483 if (ExtraInfo & InlineAsm::Extra_IsConvergent)
484 Result.push_back("isconvergent");
485 if (ExtraInfo & InlineAsm::Extra_IsAlignStack)
486 Result.push_back("alignstack");
487 if (ExtraInfo & InlineAsm::Extra_MayUnwind)
488 Result.push_back("unwind");
489
490 AsmDialect Dialect = getDialect(ExtraInfo);
491 if (Dialect == InlineAsm::AD_ATT)
492 Result.push_back("attdialect");
493 if (Dialect == InlineAsm::AD_Intel)
494 Result.push_back("inteldialect");
495
496 return Result;
497 }
498
500 switch (C) {
502 return "es";
504 return "i";
506 return "k";
508 return "m";
510 return "o";
512 return "v";
514 return "A";
516 return "Q";
518 return "R";
520 return "S";
522 return "T";
524 return "Um";
526 return "Un";
528 return "Uq";
530 return "Us";
532 return "Ut";
534 return "Uv";
536 return "Uy";
538 return "X";
540 return "Z";
542 return "ZB";
544 return "ZC";
546 return "Zy";
548 return "p";
550 return "ZQ";
552 return "ZR";
554 return "ZS";
556 return "ZT";
558 return "RF";
559 default:
560 llvm_unreachable("Unknown memory constraint");
561 }
562 }
563};
564
565} // end namespace llvm
566
567#endif // LLVM_IR_INLINEASM_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file implements methods to test, set and extract typed bits from packed unsigned integers.
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
#define LLVM_ABI
Definition Compiler.h:211
const size_t AbstractManglingParser< Derived, Alloc >::NumOps
#define F(x, y, z)
Definition MD5.cpp:54
ppc ctr loops verify
This file defines the SmallVector class.
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
Class to represent function types.
void setRegMayBeFolded(bool B)
Set a bit to denote that while this operand is some kind of register (use, def, .....
Definition InlineAsm.h:455
bool isImmKind() const
Definition InlineAsm.h:341
bool isClobberKind() const
Definition InlineAsm.h:340
void setRegClass(unsigned RC)
setRegClass - Augment an existing flag with the required register class for the following register op...
Definition InlineAsm.h:421
void setNumOperandRegisters(unsigned NumOps)
Set the number of operands that follow the flag.
Definition InlineAsm.h:376
StringRef getKindName() const
Definition InlineAsm.h:344
void clearMemConstraint()
clearMemConstraint - Similar to setMemConstraint(0), but without the assertion checking that the cons...
Definition InlineAsm.h:437
Kind getKind() const
Definition InlineAsm.h:334
Flag(enum Kind K, unsigned NumOps)
Definition InlineAsm.h:329
bool hasRegClassConstraint(unsigned &RC) const
hasRegClassConstraint - Returns true if the flag contains a register class constraint.
Definition InlineAsm.h:393
bool isRegUseKind() const
Definition InlineAsm.h:335
bool isMemKind() const
Definition InlineAsm.h:342
void setMatchingOp(unsigned OperandNo)
setMatchingOp - Augment an existing flag with information indicating that this input operand is tied ...
Definition InlineAsm.h:412
void setMemConstraint(ConstraintCode C)
setMemConstraint - Augment an existing flag with the constraint code for a memory constraint.
Definition InlineAsm.h:431
ConstraintCode getMemoryConstraintID() const
Definition InlineAsm.h:404
static constexpr unsigned getMaxNumOperandRegisters()
The largest number of operands that a flag can describe.
Definition InlineAsm.h:370
bool getRegMayBeFolded() const
Definition InlineAsm.h:461
bool isUseOperandTiedToDef(unsigned &Idx) const
isUseOperandTiedToDef - Return true if the flag of the inline asm operand indicates it is an use oper...
Definition InlineAsm.h:384
bool isFuncKind() const
Definition InlineAsm.h:343
unsigned getNumOperandRegisters() const
getNumOperandRegisters - Extract the number of registers field from the inline asm operand flag.
Definition InlineAsm.h:365
bool isRegDefEarlyClobberKind() const
Definition InlineAsm.h:337
bool isRegDefKind() const
Definition InlineAsm.h:336
LLVM_ABI void collectAsmStrs(SmallVectorImpl< StringRef > &AsmStrs) const
Definition InlineAsm.cpp:63
static AsmDialect getDialect(unsigned ExtraInfo)
Definition InlineAsm.h:471
static LLVM_ABI InlineAsm * get(FunctionType *Ty, StringRef AsmString, StringRef Constraints, bool hasSideEffects, bool isAlignStack=false, AsmDialect asmDialect=AD_ATT, bool canThrow=false)
InlineAsm::get - Return the specified uniqued inline asm string.
Definition InlineAsm.cpp:43
std::vector< SubConstraintInfo > SubConstraintInfoVector
Definition InlineAsm.h:122
std::vector< ConstraintInfo > ConstraintInfoVector
Definition InlineAsm.h:124
static std::vector< StringRef > getExtraInfoNames(unsigned ExtraInfo)
Definition InlineAsm.h:475
friend struct InlineAsmKeyType
Definition InlineAsm.h:44
bool isAlignStack() const
Definition InlineAsm.h:75
AsmDialect getDialect() const
Definition InlineAsm.h:76
LLVM_ABI FunctionType * getFunctionType() const
getFunctionType - InlineAsm's are always pointers to functions.
Definition InlineAsm.cpp:59
bool hasSideEffects() const
Definition InlineAsm.h:74
StringRef getAsmString() const
Definition InlineAsm.h:89
InlineAsm(const InlineAsm &)=delete
ConstraintInfoVector ParseConstraints() const
ParseConstraints - Parse the constraints of this inlineasm object, returning them the same way that P...
Definition InlineAsm.h:195
bool canThrow() const
Definition InlineAsm.h:77
std::vector< std::string > ConstraintCodeVector
Definition InlineAsm.h:105
static StringRef getMemConstraintName(ConstraintCode C)
Definition InlineAsm.h:499
StringRef getConstraintString() const
Definition InlineAsm.h:90
PointerType * getType() const
getType - InlineAsm's are always pointers.
Definition InlineAsm.h:81
static bool classof(const Value *V)
Definition InlineAsm.h:200
InlineAsm & operator=(const InlineAsm &)=delete
Class to represent pointers.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Type * getType() const
All values are typed, get the type of this value.
Definition Value.h:257
LLVM_ABI Value(Type *Ty, unsigned scid)
Definition Value.cpp:49
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
constexpr T maskTrailingOnes(unsigned N)
Create a bitmask with the N right-most bits set to 1, and all other bits set to 0.
Definition MathExtras.h:78
Describes an element of a Bitfield.
Definition Bitfields.h:176
static Bitfield::Type get(StorageType Packed)
Unpacks the field from the Packed value.
Definition Bitfields.h:207
static void set(StorageType &Packed, typename Bitfield::Type Value)
Sets the typed value in the provided Packed value.
Definition Bitfields.h:223
bool isCommutative
isCommutative - This is set to true for a constraint that is commutative with the next operand.
Definition InlineAsm.h:147
ConstraintPrefix Type
Type - The basic type of the constraint: input/output/clobber/label.
Definition InlineAsm.h:129
int MatchingInput
MatchingInput - If this is not -1, this is an output constraint where an input constraint is required...
Definition InlineAsm.h:139
ConstraintCodeVector Codes
Code - The constraint code, either the register name (in braces) or the constraint letter/number.
Definition InlineAsm.h:157
unsigned currentAlternativeIndex
The currently selected alternative constraint index.
Definition InlineAsm.h:167
ConstraintInfo()=default
Default constructor.
LLVM_ABI bool Parse(StringRef Str, ConstraintInfoVector &ConstraintsSoFar)
Parse - Analyze the specified string (e.g.
Definition InlineAsm.cpp:79
bool hasArg() const
Whether this constraint corresponds to an argument.
Definition InlineAsm.h:182
SubConstraintInfoVector multipleAlternatives
multipleAlternatives - If there are multiple alternative constraints, this array will contain them.
Definition InlineAsm.h:164
bool isIndirect
isIndirect - True if this operand is an indirect operand.
Definition InlineAsm.h:153
bool isEarlyClobber
isEarlyClobber - "&": output operand writes result before inputs are all read.
Definition InlineAsm.h:133
bool isMultipleAlternative
isMultipleAlternative - '|': has multiple-alternative constraints.
Definition InlineAsm.h:160
LLVM_ABI void selectAlternative(unsigned index)
selectAlternative - Point this constraint to the alternative constraint indicated by the index.
bool hasMatchingInput() const
hasMatchingInput - Return true if this is an output constraint that has a matching input constraint.
Definition InlineAsm.h:143
ConstraintCodeVector Codes
Code - The constraint code, either the register name (in braces) or the constraint letter/number.
Definition InlineAsm.h:116
int MatchingInput
MatchingInput - If this is not -1, this is an output constraint where an input constraint is required...
Definition InlineAsm.h:112
SubConstraintInfo()=default
Default constructor.