[PATCH] D96734: Transforms: Clone distinct nodes in metadata mapper unless RF_ReuseAndMutateDistinctMDs
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 15 17:11:48 PST 2021
dexonsmith marked an inline comment as done.
dexonsmith added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/ValueMapper.cpp:546
? M.mapToSelf(&N)
- : M.mapToMetadata(&N, cloneOrBuildODR(N))));
+ : M.mapToMetadata(&N, cloneDistinct(N))));
return DistinctWorklist.back();
----------------
tejohnson wrote:
> Why not just call MDNode::replaceWithDistinct(N.clone()) directly?
I had imagined this logic would get too busy, but actually this is fine. Thanks for the suggestion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96734/new/
https://reviews.llvm.org/D96734
More information about the llvm-commits
mailing list