[PATCH] D19075: mergefunc: avoid merge with loop metadata

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 12:53:11 PDT 2016


hfinkel added a comment.

In http://reviews.llvm.org/D19075#406897, @jfb wrote:

> In http://reviews.llvm.org/D19075#405855, @hfinkel wrote:
>
> > Do we not unqiue MDNodes? This seems like a lot of code for what I would have thought should be: Compare the pointer equality all MDNode operands except the first (because the first is the unique loop id).
>
>
> mergefunc wants an ordering for what it compares, so pure equality isn't sufficient (although `cmpLoopOperandMetadata` does start with `L == R`). It needs to know how to order in a stable way, so we also can't just order based on pointer value.


Do you not already have a way to do this for metadata in general?


http://reviews.llvm.org/D19075





More information about the llvm-commits mailing list