llvm-project/llvm
Philip Reames bb781b46e2 [LVI] Handle constants defensively
There's nothing preventing callers of LVI from asking for lattice values representing a Constant.  In fact, given that several callers are walking back through PHI nodes and trying to simplify predicates, such queries are actually quite common.  This is mostly harmless today, but we start volatiling assertions if we add new calls to getBlockValue in otherwise reasonable places.

Note that this change is not NFC.  Specifically:
1) The result returned through getValueAt will now be more precise.  In principle, this could trigger any latent infinite optimization loops in callers, but in practice, we're unlikely to see this.
2) The result returned through getBlockValueAt is potentially weakened for non-constants that were previously queried.  With the old code, you had the possibility that a later query might bypass the cache and discover some information the original query did not.  I can't find a scenario which actually causes this to happen, but it was in principle possible.  On the other hand, this may end up reducing compile time when the same value is queried repeatedly.  

llvm-svn: 260439
2016-02-10 21:46:32 +00:00
..
bindings Remove autoconf support 2016-01-26 21:29:08 +00:00
cmake Disable MSVC 2015's warning about zero extending after ~ and others 2016-02-10 19:25:51 +00:00
docs [llvm-nm] Add -radix option 2016-02-10 17:51:39 +00:00
examples Remove autoconf support 2016-01-26 21:29:08 +00:00
include [codeview] Describe int local variables using .cv_def_range 2016-02-10 20:55:49 +00:00
lib [LVI] Handle constants defensively 2016-02-10 21:46:32 +00:00
projects Remove autoconf support 2016-01-26 21:29:08 +00:00
resources
test [codeview] Describe int local variables using .cv_def_range 2016-02-10 20:55:49 +00:00
tools [llvm-readobj] Option to emit readelf like output 2016-02-10 20:40:55 +00:00
unittests Fix a -Wsign-compare in Support Path unittests 2016-02-10 19:29:01 +00:00
utils SelectionDAG: Make Properties a field of SDPatternOperator 2016-02-10 18:40:04 +00:00
.arcconfig
.clang-format
.clang-tidy adding readability-identifier-naming to llvm clang-tidy configuration. 2015-12-08 17:44:51 +00:00
.gitignore
CMakeLists.txt [GlobalISel] Add the proper cmake plumbing. 2016-01-20 20:58:56 +00:00
CODE_OWNERS.TXT [docs] Remove references to autotools build. 2016-01-30 01:10:15 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt Revert previous test commit. 2016-01-04 19:13:29 +00:00
configure Remove autoconf support 2016-01-26 21:29:08 +00:00
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

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.