I don’t quite understand the llvm::use class, from the class ref, I read that:
“A Use represents the edge between a Value definition and its users.This is notionally a two-dimensional linked list”
I can image that it’s like an edge between the operand<->User, but how to comprehend the “two-dimensional linked list” ?
(Instruction derives from User that derives from Value)
And I found “use_iterator()” in Value, for example: a Value ‘v’, if it’s an operand of many Instructions ‘i1,i2,i3…’, then in my understanding, uses of v are just i1, i2, i3… but what’s the difference between use and user in this case ??
Besides, if the Value ‘v’ here is itself an Instruction, then what are its ‘uses’ and ‘users’ ?? I feel that the result of an instruction can be an operand of another instruction, but it should not be regarded as the instruction itself right ??
Very confused…hope I can get some help to clarify my thoughts…