@@ -276,13 +276,12 @@ class SymbolInfoMap {
276
276
// Structure to uniquely distinguish different locations of the symbols.
277
277
//
278
278
// * If a symbol is defined as an operand of an operation, `dag` specifies
279
- // the DAG of the operation, `operandIndexOrNumValues ` specifies the
280
- // operand index, and `variadicSubIndex` must be set to `std::nullopt`.
279
+ // the DAG of the operation, `argIndexOrNumValues ` specifies the
280
+ // index, and `variadicSubIndex` must be set to `std::nullopt`.
281
281
//
282
282
// * If a symbol is defined in a `variadic` DAG, `dag` specifies the DAG
283
- // of the parent operation, `operandIndexOrNumValues` specifies the
284
- // declared operand index of the variadic operand in the parent
285
- // operation.
283
+ // of the parent operation, `argIndexOrNumValues` specifies the
284
+ // declared index of the variadic operand in the parent operation.
286
285
//
287
286
// - If the symbol is defined as a result of `variadic` DAG, the
288
287
// `variadicSubIndex` must be set to `std::nullopt`, which means that
@@ -292,9 +291,9 @@ class SymbolInfoMap {
292
291
// be set to the index within the variadic sub-operand list.
293
292
//
294
293
// * If a symbol is defined in a `either` DAG, `dag` specifies the DAG
295
- // of the parent operation, `operandIndexOrNumValues ` specifies the
296
- // operand index in the parent operation (not necessary the index in the
297
- // DAG).
294
+ // of the parent operation, `argIndexOrNumValues ` specifies the
295
+ // operand's index in the parent operation (not necessarily its index
296
+ // in the DAG).
298
297
//
299
298
// * If a symbol is defined as a result, specifies the number of returning
300
299
// value.
@@ -347,17 +346,17 @@ class SymbolInfoMap {
347
346
// DagNode and DagLeaf are accessed by value which means it can't be used
348
347
// as identifier here. Use an opaque pointer type instead.
349
348
const void *dag;
350
- int operandIndexOrNumValues ;
349
+ int argIndexOrNumValues ;
351
350
std::optional<int > variadicSubIndex;
352
351
353
- DagAndConstant (const void *dag, int operandIndexOrNumValues ,
352
+ DagAndConstant (const void *dag, int argIndexOrNumValues ,
354
353
std::optional<int > variadicSubIndex)
355
- : dag(dag), operandIndexOrNumValues(operandIndexOrNumValues ),
354
+ : dag(dag), argIndexOrNumValues(argIndexOrNumValues ),
356
355
variadicSubIndex (variadicSubIndex) {}
357
356
358
357
bool operator ==(const DagAndConstant &rhs) const {
359
358
return dag == rhs.dag &&
360
- operandIndexOrNumValues == rhs.operandIndexOrNumValues &&
359
+ argIndexOrNumValues == rhs.argIndexOrNumValues &&
361
360
variadicSubIndex == rhs.variadicSubIndex ;
362
361
}
363
362
};
@@ -385,11 +384,11 @@ class SymbolInfoMap {
385
384
return SymbolInfo (nullptr , Kind::Attr, std::nullopt);
386
385
}
387
386
static SymbolInfo
388
- getOperand (DagNode node, const Operator *op, int operandIndex ,
387
+ getOperand (DagNode node, const Operator *op, int index ,
389
388
std::optional<int > variadicSubIndex = std::nullopt) {
390
- return SymbolInfo (op, Kind::Operand,
391
- DagAndConstant (node. getAsOpaquePointer (), operandIndex ,
392
- variadicSubIndex));
389
+ return SymbolInfo (
390
+ op, Kind::Operand ,
391
+ DagAndConstant (node. getAsOpaquePointer (), index, variadicSubIndex));
393
392
}
394
393
static SymbolInfo getResult (const Operator *op) {
395
394
return SymbolInfo (op, Kind::Result, std::nullopt);
@@ -427,10 +426,10 @@ class SymbolInfoMap {
427
426
const char *separator) const ;
428
427
429
428
// The argument index (for `Attr` and `Operand` only)
430
- int getArgIndex () const { return dagAndConstant->operandIndexOrNumValues ; }
429
+ int getArgIndex () const { return dagAndConstant->argIndexOrNumValues ; }
431
430
432
431
// The number of values in the MultipleValue
433
- int getSize () const { return dagAndConstant->operandIndexOrNumValues ; }
432
+ int getSize () const { return dagAndConstant->argIndexOrNumValues ; }
434
433
435
434
// The variadic sub-operands index (for variadic `Operand` only)
436
435
std::optional<int > getVariadicSubIndex () const {
0 commit comments