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.
Paths
| Differential D65528
[IR] Value: add replaceUsesWithIf() utility ClosedPublic Authored by lebedev.ri on Jul 31 2019, 11:48 AM.
Details Summary While there is always a Value::replaceAllUsesWith(), I have only cleaned a few cases where replaceUsesWithIf()
Diff Detail
Event TimelineHerald added subscribers: asbirlea, george.burgess.iv, aheejin and 4 others. · View Herald TranscriptJul 31 2019, 11:48 AM
This revision is now accepted and ready to land.Jul 31 2019, 12:36 PM Closed by commit rL367548: [IR] Value: add replaceUsesWithIf() utility (authored by lebedevri). · Explain WhyAug 1 2019, 5:32 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 212789 llvm/trunk/include/llvm/IR/Value.h
llvm/trunk/lib/Analysis/MemorySSAUpdater.cpp
llvm/trunk/lib/IR/Value.cpp
llvm/trunk/lib/Target/WebAssembly/WebAssemblyOptimizeReturned.cpp
llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp
llvm/trunk/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/trunk/lib/Transforms/Scalar/LoopSink.cpp
|