I am not sure about the meaning of Type in the name (was it meant be interpreted as Kind?), and given the importance and meaning of Type in the context of MLIR, its probably better to rename it. Given the comment in the source code, the suggestion in the GitHub issue and the final discussions in the review, this patch renames the OperandType to UnresolvedOperand.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Rename occurrences in variable names as well as comments as well (Only found a few in Parser.cpp)
Thank you for tackling this! I agree that "OperandType" isn't the right thing, but I don't think "OperandReference" is either. The key thing about this is that it models an occurrence of an SSA value in an operand position, but without having a type applied to it. "Operand" and "Reference" are somewhat redundant.
What do you think about a name like "UnboundOperand" or "OperandWithoutAType" (joking but may you have a better idea) or OperandSyntax or LexicalOperand?
Hmm. One of the names I had in mind as well was "OperandOccurrence". From the names you listed I like "UnboundOperand" the most (bit of a symmetry with resolveOperands as well).
I don't have a very strong opinion of any of those names however (except maybe "OperandWithoutAType" :) ).
I was leaning towards OperandOccurrence as well. But now that you point out the relationship with resolveOperands, I think that UnboundOperand or UnresolvedOperand would be good options too.
Thanks for tackling this!