llvm-project/llvm/lib
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
..
Analysis Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
AsmParser Objective-C Class Properties: Autoupgrade "Class Properties" module flag. 2016-05-25 23:14:48 +00:00
Bitcode Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
CodeGen Disable lifetime-start-on-first-use analysis. 2016-05-27 15:27:51 +00:00
DebugInfo Make sure these error codes are marked as checked 2016-05-27 16:16:56 +00:00
ExecutionEngine Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
Fuzzer [LibFuzzer] Refactor declaration of tests in CMake. 2016-05-27 03:14:40 +00:00
IR Don't generate unnecessary signed ConstantRange during multiply. NFC 2016-05-27 17:06:50 +00:00
IRReader Remove autoconf support 2016-01-26 21:29:08 +00:00
LTO [ThinLTO] Resolve LinkOnceAny 2016-05-26 14:16:52 +00:00
LibDriver LibDriver: Silently do nothing when provided no inputs. 2016-04-13 19:36:04 +00:00
LineEditor Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
Linker Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
MC Apply clang-tidy's misc-move-constructor-init throughout LLVM. 2016-05-27 14:27:24 +00:00
Object [CMake] Restrict libxar linkage to just llvm-objdump 2016-05-26 16:32:40 +00:00
ObjectYAML [obj2yaml][yaml2obj] Support for MachO lazy bindings 2016-05-26 21:29:39 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
Passes [PM] Port PartiallyInlineLibCalls to the new pass manager. 2016-05-25 23:38:53 +00:00
ProfileData Add FIXMEs to all derived classes of std::error_category. 2016-05-24 20:13:46 +00:00
Support Avoid some copies by using const references. 2016-05-27 12:30:51 +00:00
TableGen [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
Target Use StringRef::startswith instead of find(...) == 0. 2016-05-27 16:54:57 +00:00
Transforms Use StringRef::startswith instead of find(...) == 0. 2016-05-27 16:54:57 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
LLVMBuild.txt Add LLVMBuild for ObjectYAML. 2016-03-01 21:29:33 +00:00