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

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 13:08:40 PST 2016


davide 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);
+
----------------
majnemer wrote:
> How about `replaceNonMetadataUsesWith`
Sure.


================
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;
----------------
majnemer wrote:
> I think we can remove this special case now.
Hal suggested to keep it as a micro-optimization. I'm fine either way.


https://reviews.llvm.org/D27534





More information about the llvm-commits mailing list