[PATCH] D37038: Replace temp MD nodes with unique/distinct before cloning

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 29 17:34:58 PDT 2017


probinson added a comment.

In https://reviews.llvm.org/D37038#855559, @aprantl wrote:

> This may have gotten lost earlier:  Would it be possible to instruct CloneFunction to not clone any temporary MDNodes via one of the flags that are passed to the ValueMapper?


I tried that.  Basically, the new flag just disabled all the `isUniqued` assertions.  What I found for test case 1 is that the DIE for CharlieImpl was duplicated, but there was only one copy of Charlie.  This is, hmmm, less bad (I hesitate to say "better") than the original patch, which duplicated both CharlieImpl and Charlie.  Obviously we'd rather not duplicate anything.


https://reviews.llvm.org/D37038





More information about the cfe-commits mailing list