llvm-project/llvm
Roman Lebedev 081e990d08 [IR] Value: add replaceUsesWithIf() utility
Summary:
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.

Reviewers: jdoerfert, spatel, RKSimon, craig.topper

Reviewed By: jdoerfert

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, aheejin, george.burgess.iv, asbirlea, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65528

llvm-svn: 367548
2019-08-01 12:32:08 +00:00
..
benchmarks
bindings
cmake Re-disable C4324 MSVC warning that was enabled in D65458 / rL367383 2019-07-31 11:06:05 +00:00
docs Attempt to unbreak sphinx build bot by inserting a link. 2019-07-31 22:14:26 +00:00
examples [ORC] Add deprecation warnings to ORCv1 layers and utilities. 2019-07-17 16:40:52 +00:00
include [IR] Value: add replaceUsesWithIf() utility 2019-08-01 12:32:08 +00:00
lib [IR] Value: add replaceUsesWithIf() utility 2019-08-01 12:32:08 +00:00
projects Revert "[libc++] Integrate the PSTL into libc++" 2019-07-19 18:52:46 +00:00
resources
runtimes
test [ARM] Fix for MVE VREV64 2019-08-01 11:22:03 +00:00
tools Reland "[DwarfDebug] Dump call site debug info" 2019-07-31 16:51:28 +00:00
unittests [LLVM][Alignment] Fix AlignmentTest on platform where size_t != uint64_t 2019-08-01 09:20:00 +00:00
utils gn build: Merge r367463 2019-07-31 18:56:49 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [build] Add the ability to create a symlink for lipo 2019-07-31 16:46:57 +00:00
CODE_OWNERS.TXT Update email address in CODE_OWNERS 2019-07-01 16:01:15 +00:00
CREDITS.TXT Update email address. 2019-07-17 07:02:02 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.