This updates the use list algorithms to support querying from a specific symbol, allowing for the collection and detection of nested references. This works by walking the parent "symbol scopes" and applying the existing algorithm at each level.
I don't know this part as well as Mehdi does, but it looks good.
So we'd have nullptr returned if either a op has no parent or if its parent is a unknown op? This seems sort of difficult to interpret for a caller (e.g., I found no symbol table or I found an unregistered op). Or what should be done when nullptr is returned? [and could you add that to the comment describing the functions]
Also do we have a test that exercises this?
So we don't need to assert here as to the type as we are effectively invoking line 188 here? I'd be pro asserting here too just as it makes the precondition clear.
missing space ?