llvm-project/llvm
Heejin Ahn 27e4afcea7 [DSE] Don't remove nounwind invokes
For non-mem-intrinsic and non-lifetime `CallBase`s, the current
`isRemovable` function only checks if the `CallBase` 1. has no uses 2.
will return 3. does not throw:
80fb782336/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (L1017)

But we should also exclude invokes even in case they don't throw,
because they are terminators and thus cannot be removed. While it
doesn't seem to make much sense for `invoke`s to have an `nounwind`
target, this kind of code can be generated and is also valid bitcode.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D128224
2022-06-21 11:54:09 -07:00
..
benchmarks
bindings [llvm-ocaml] Add and use opaque pointer compatible bindings 2022-06-02 11:42:24 +02:00
cmake [CMake][MSVC] Compile with `/permissive-` 2022-06-20 12:42:51 -07:00
docs [docs] More clearly document that the CoC applies to online sync-ups and office hours. 2022-06-20 13:47:53 +02:00
examples Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 01:07:51 -07:00
include [InstCombine] handle subobjects of constant aggregates 2022-06-21 11:55:14 -06:00
lib [DSE] Don't remove nounwind invokes 2022-06-21 11:54:09 -07:00
projects
resources
runtimes Revert "[runtimes] Detect changes to Tests.cmake" 2022-05-26 09:34:18 -07:00
test [DSE] Don't remove nounwind invokes 2022-06-21 11:54:09 -07:00
tools in the absense of the -max-pass-iterations command line options, make 2022-06-21 10:47:42 -06:00
unittests [FunctionPropertiesAnalysis] Generalize support for unreachable 2022-06-21 08:18:01 -07:00
utils [gdb-scripts] Add to_string methods to printer implementations 2022-06-21 16:09:30 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Revert "[CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux" 2022-06-21 13:13:46 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.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.