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

JF Bastien via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 12:51:00 PDT 2016


jfb added a comment.

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.


http://reviews.llvm.org/D19075





More information about the llvm-commits mailing list