[PATCH] D65528: [IR] Value: add replaceUsesWithIf() utility

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 11:48:44 PDT 2019


lebedev.ri created this revision.
lebedev.ri added reviewers: jdoerfert, spatel, RKSimon, craig.topper.
lebedev.ri added a project: LLVM.
Herald added subscribers: asbirlea, george.burgess.iv, aheejin, hiraditya, jgravelle-google, sbc100, dschuff.

While there is always a `Value::replaceAllUsesWith()`,
sometimes the replacement needs to be conditional.

I have only cleaned a few cases where `replaceUsesWithIf()`
could be used, to both add test coverage,
and show that it is actually useful.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65528

Files:
  llvm/include/llvm/IR/Value.h
  llvm/lib/Analysis/MemorySSAUpdater.cpp
  llvm/lib/IR/Value.cpp
  llvm/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp
  llvm/lib/Transforms/IPO/LowerTypeTests.cpp
  llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
  llvm/lib/Transforms/Scalar/LoopSink.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65528.212633.patch
Type: text/x-patch
Size: 6653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190731/3d918785/attachment.bin>


More information about the llvm-commits mailing list