@@ -32,7 +32,7 @@ namespace llvm {
32
32
// / AsmString - The format string used to emit a .s file for the
33
33
// / instruction.
34
34
std::string AsmString;
35
-
35
+
36
36
class ConstraintInfo {
37
37
enum { None, EarlyClobber, Tied } Kind;
38
38
unsigned OtherTiedOperand;
@@ -45,24 +45,24 @@ namespace llvm {
45
45
I.OtherTiedOperand = 0 ;
46
46
return I;
47
47
}
48
-
48
+
49
49
static ConstraintInfo getTied (unsigned Op) {
50
50
ConstraintInfo I;
51
51
I.Kind = Tied;
52
52
I.OtherTiedOperand = Op;
53
53
return I;
54
54
}
55
-
55
+
56
56
bool isNone () const { return Kind == None; }
57
57
bool isEarlyClobber () const { return Kind == EarlyClobber; }
58
58
bool isTied () const { return Kind == Tied; }
59
-
59
+
60
60
unsigned getTiedOperand () const {
61
61
assert (isTied ());
62
62
return OtherTiedOperand;
63
63
}
64
64
};
65
-
65
+
66
66
// / OperandInfo - The information we keep track of for each operand in the
67
67
// / operand list for a tablegen instruction.
68
68
struct OperandInfo {
@@ -91,16 +91,16 @@ namespace llvm {
91
91
// / the DisableEncoding list. These should not be emitted by the code
92
92
// / emitter.
93
93
std::vector<bool > DoNotEncode;
94
-
94
+
95
95
// / MIOperandInfo - Default MI operand type. Note an operand may be made
96
96
// / up of multiple MI operands.
97
97
DagInit *MIOperandInfo;
98
-
98
+
99
99
// / Constraint info for this operand. This operand can have pieces, so we
100
100
// / track constraint info for each.
101
101
std::vector<ConstraintInfo> Constraints;
102
102
103
- OperandInfo (Record *R, const std::string &N, const std::string &PMN,
103
+ OperandInfo (Record *R, const std::string &N, const std::string &PMN,
104
104
unsigned MION, unsigned MINO, DagInit *MIOI)
105
105
: Rec(R), Name(N), PrinterMethodName(PMN), MIOperandNo(MION),
106
106
MINumOperands (MINO), MIOperandInfo(MIOI) {}
@@ -144,21 +144,21 @@ namespace llvm {
144
144
bool isAsCheapAsAMove;
145
145
bool hasExtraSrcRegAllocReq;
146
146
bool hasExtraDefRegAllocReq;
147
-
147
+
148
148
// / ParseOperandName - Parse an operand name like "$foo" or "$foo.bar",
149
149
// / where $foo is a whole operand and $foo.bar refers to a suboperand.
150
150
// / This throws an exception if the name is invalid. If AllowWholeOp is
151
151
// / true, references to operands with suboperands are allowed, otherwise
152
152
// / not.
153
153
std::pair<unsigned ,unsigned > ParseOperandName (const std::string &Op,
154
154
bool AllowWholeOp = true );
155
-
155
+
156
156
// / getFlattenedOperandNumber - Flatten a operand/suboperand pair into a
157
157
// / flat machineinstr operand #.
158
158
unsigned getFlattenedOperandNumber (std::pair<unsigned ,unsigned > Op) const {
159
159
return OperandList[Op.first ].MIOperandNo + Op.second ;
160
160
}
161
-
161
+
162
162
// / getSubOperandNumber - Unflatten a operand number into an
163
163
// / operand/suboperand pair.
164
164
std::pair<unsigned ,unsigned > getSubOperandNumber (unsigned Op) const {
@@ -168,8 +168,8 @@ namespace llvm {
168
168
return std::make_pair (i, Op-OperandList[i].MIOperandNo );
169
169
}
170
170
}
171
-
172
-
171
+
172
+
173
173
// / isFlatOperandNotEmitted - Return true if the specified flat operand #
174
174
// / should not be emitted with the code emitter.
175
175
bool isFlatOperandNotEmitted (unsigned FlatOpNo) const {
@@ -185,11 +185,11 @@ namespace llvm {
185
185
// / non-empty name. If the instruction does not have an operand with the
186
186
// / specified name, throw an exception.
187
187
unsigned getOperandNamed (const std::string &Name) const ;
188
-
188
+
189
189
// / HasOneImplicitDefWithKnownVT - If the instruction has at least one
190
190
// / implicit def and it has a known VT, return the VT, otherwise return
191
191
// / MVT::Other.
192
- MVT::SimpleValueType
192
+ MVT::SimpleValueType
193
193
HasOneImplicitDefWithKnownVT (const CodeGenTarget &TargetInfo) const ;
194
194
};
195
195
}
0 commit comments