llvm-project/llvm
Vedant Kumar 8359511c62 [CodeExtractor] Remove stale llvm.assume calls from extracted region
During extraction, stale llvm.assume handles may be retained in the
original function. The setup is:

1) CodeExtractor unregisters assumptions in the blocks that are to be
   extracted.

2) Extraction happens. There are now two functions: f1 and f1.extracted.

3) Leftover assumptions in f1 (/not/ removed as they were not in the set of
   blocks to be extracted) now have affected-value llvm.assume handles in
   f1.extracted.

When assumptions for a value used in f1 are looked up, ValueTracking can assert
as some of the handles are in the wrong function. To fix this, simply erase the
llvm.assume calls in the extracted function.

Alternatives include flushing the assumption cache in the original function, or
walking all values used in the original function to prune stale affected-value
handles. Both seem more expensive.

Testing: check-llvm, LNT run with -mllvm -hot-cold-split enabled

rdar://58460728
2020-01-28 17:18:01 -08:00
..
benchmarks
bindings Pass length of string in Go binding of CreateCompileUnit 2020-01-17 13:35:30 -08:00
cmake [CMake] Set ASM compiler for external projects 2020-01-28 11:39:21 -08:00
docs Fix sphinx build bot failure. NFCI. 2020-01-28 22:07:34 +08:00
examples Fix implicit conversions in example code. 2020-01-29 00:17:35 +01:00
include [CodeExtractor] Remove stale llvm.assume calls from extracted region 2020-01-28 17:18:01 -08:00
lib [CodeExtractor] Remove stale llvm.assume calls from extracted region 2020-01-28 17:18:01 -08:00
projects
resources
runtimes [runtimes] Fix passing lists to runtimes configures 2020-01-28 14:36:14 -08:00
test [CodeExtractor] Remove stale llvm.assume calls from extracted region 2020-01-28 17:18:01 -08:00
tools Another stab at making the gold plugin compile again 2020-01-29 02:12:53 +01:00
unittests [CodeExtractor] Remove stale llvm.assume calls from extracted region 2020-01-28 17:18:01 -08:00
utils Address implicit conversions detected by g++ 5 only. 2020-01-29 01:01:09 +01:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore [llvm] Fix file ignoring inside directories 2020-01-27 17:00:33 -08:00
CMakeLists.txt Bump the trunk major version to 11 2020-01-15 13:38:01 +01:00
CODE_OWNERS.TXT [VE] Target stub for NEC SX-Aurora 2020-01-09 11:17:35 +01:00
CREDITS.TXT
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.