llvm-project/llvm
Pete Cooper 34a7a945b0 Don't generate unnecessary signed ConstantRange during multiply. NFC
r231483 taught ConstantRange::multiply to be clever about signed vs unsigned ranges. For example, an unsigned range could be full-set while the signed range is more specific than that.

In looking at the allocations trace for LTO'ing verify-uselistorder (see r236629 for details), millions of allocations are from APInt, many of which come from ConstantRange's.

This change tries to avoid some (3.2 million) allocations by returning the unsigned range if its suitable. The checks here are that it should not be a wrapping range, and should be positive. That should be enough to check for ranges such as [1, 10) which the signed range will be equal to, if we were to calculate it.

Differential Revision: http://reviews.llvm.org/D20723

Reviewed by James Molloy

llvm-svn: 271020
2016-05-27 17:06:50 +00:00
..
bindings Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
cmake Since some time clang itself figures out the default for ms-compatibility-version and uses it. Trying to figure it out during build is redundant and also will not work when the environment variable VSINSTALLDIR is not defined (which is not defined if you don't install whole Visual Studio but use Visual C++ Build Tools package). 2016-05-26 15:52:23 +00:00
docs [Docs][WritingAnLLVMBackend] Makefiles are deprecated 2016-05-26 21:31:56 +00:00
examples [Kaleidoscope][BuildingAJIT] Remove leftover debugging output statements. 2016-05-26 21:27:52 +00:00
include Make header self-contained. NFC. 2016-05-27 15:21:30 +00:00
lib Don't generate unnecessary signed ConstantRange during multiply. NFC 2016-05-27 17:06:50 +00:00
projects
resources
test Move test to X86 directory: I think it depends on X86 TTI. 2016-05-27 16:56:54 +00:00
tools Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
unittests [Support] Rename unconvertibleErrorCode to inconvertibleErrorCode. 2016-05-27 01:54:25 +00:00
utils Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
.arcconfig
.clang-format
.clang-tidy Don't use misc-unused-parameters check on LLVM. 2016-04-13 08:58:52 +00:00
.gitignore
CMakeLists.txt Remove LLVM_ENABLE_TIMESTAMPS 2016-05-05 19:57:03 +00:00
CODE_OWNERS.TXT Sort my entry in CODE_OWNERS.TXT 2016-05-26 23:10:37 +00:00
CREDITS.TXT Update my email address. 2016-05-10 16:23:54 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
configure
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.