Those names don't really exist in the in-memory representation of the IR -- there, values just refer to other values using pointers. The names are computed and added to the textual form as it's being written out. This makes sense since transforms are constantly manipulating the IR and it would be expensive to have to go and update all the names whenever an instruction is inserted somewhere.
Those names don't really exist in the in-memory representation of the IR -- there, values just refer to other values using pointers. The names are computed and added to the textual form as it's being written out. This makes sense since transforms are constantly manipulating the IR and it would be expensive to have to go and update all the names whenever an instruction is inserted somewhere.
You can look at the source for the
AsmWriter
to verify this -- the incrementing numbers are assigned by theSlotTracker
here, and here's the code that that prints out an instruction line in the IR, using the name if it's present or the slot number if not.