[PATCH] D27534: [BDCE] Skip metadata while replacing uses

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 13:05:43 PST 2016


majnemer added inline comments.


================
Comment at: include/llvm/IR/Value.h:277
+  /// "V" instead of "this". This function skips metadata entries in the list.
+  void RAUWExceptMetadata(Value *V);
+
----------------
How about `replaceNonMetadataUsesWith`


================
Comment at: lib/Transforms/Scalar/BDCE.cpp:42-45
     // If the instruction has side effects and no non-dbg uses,
     // BDCE should skip it.
     if (I.mayHaveSideEffects() && I.use_empty())
       continue;
----------------
I think we can remove this special case now.


https://reviews.llvm.org/D27534





More information about the llvm-commits mailing list