Since r211281 call and invoke can have range metadata which must be
taken into consideration when comparing such instructions.
The changes itself looks fine, but I have to check tests as well.. I'm moving on this week, so I can answer you in Wednesday only.
Thanks for working on it.
By the way, we finished our O(n*log(n)) patch series. You could look into FunctionPtr. Perhaps it had to be renamed to FunctionInfo or something like this.
Anyways in this structure you could keep additional data for instructions you need (such as ranges that were merged currently). I try to think, how to bring it into most generic form. Perhaps that's not only about ranges and tbaa..