llvm/lib/IR
Pete Cooper 90a2421c29 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 17:06:50 +00:00
..
AsmWriter.cpp Try to fix a msvc warning. 2016-05-11 12:37:16 +00:00
AttributeImpl.h Add the allocsize attribute to LLVM. 2016-04-12 01:05:35 +00:00
Attributes.cpp Attempt to make buildbot happier with r266032. 2016-04-12 01:44:13 +00:00
AttributesCompatFunc.td Provide a way to specify inliner's attribute compatibility and merging. 2015-12-22 23:57:37 +00:00
AutoUpgrade.cpp Revert: r270973 - [X86][SSE] Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm) 2016-05-27 09:02:25 +00:00
BasicBlock.cpp Revert "[SimplifyCFG] Extend TryToSimplifyUncondBranchFromEmptyBlock for empty block including lifetime intrinsics" 2016-05-02 19:43:22 +00:00
CMakeLists.txt Move ProfileSummary to IR. 2016-05-19 21:07:12 +00:00
Comdat.cpp [NFC] Remove some dead code: 2016-05-11 16:38:40 +00:00
ConstantFold.cpp [ConstantFold] NFC cleanup after previous change. 2016-05-26 07:08:09 +00:00
ConstantFold.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ConstantRange.cpp Don't generate unnecessary signed ConstantRange during multiply. NFC 2016-05-27 17:06:50 +00:00
Constants.cpp fix formatting; NFC 2016-05-18 22:05:28 +00:00
ConstantsContext.h Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC) 2016-04-19 00:17:55 +00:00
Core.cpp Extract renaming from D19181 2016-05-23 16:38:25 +00:00
DataLayout.cpp Rename getLargestLegalIntTypeSize to getLargestLegalIntTypeSizeInBits(). NFC. 2016-05-13 18:38:35 +00:00
DebugInfo.cpp StripDebugInfo: uses isa<DbgInfoIntrinsic> instead of matching against llvm.dbg.* (NFC) 2016-05-14 04:58:35 +00:00
DebugInfoMetadata.cpp Fixed signed/unsigned comparison warning. 2016-05-02 16:45:02 +00:00
DebugLoc.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
DiagnosticInfo.cpp Separate the Verifier into an analysis and a transformation pass and 2016-05-09 19:57:29 +00:00
DiagnosticPrinter.cpp MIR Serialization: Connect the machine function analysis pass to the MIR parser. 2015-06-15 20:30:22 +00:00
DIBuilder.cpp DebugInfo: Change DIBuilder to make distinct DIGlobalVariables 2016-04-23 22:29:09 +00:00
Dominators.cpp Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the cmake build to enable them. 2016-04-29 15:22:48 +00:00
Function.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
GCOV.cpp llvm-cov: Fix reading gcov data that does not have function names 2016-02-08 22:49:40 +00:00
Globals.cpp [IR] Copy comdats in GlobalObject::copyAttributesFrom 2016-05-25 18:36:22 +00:00
GVMaterializer.cpp [Layering] Move GVMaterializer.h into the IR library where its 2014-03-06 03:50:29 +00:00
InlineAsm.cpp [InlineAsm] Avoid creating extra string instances in ConstraintInfo::Parse() 2016-05-23 13:58:04 +00:00
Instruction.cpp [GVN] Respect fast-math-flags on fcmps 2016-04-22 06:37:51 +00:00
Instructions.cpp [GlobalOpt] Propagate operand bundles 2016-04-29 08:07:22 +00:00
IntrinsicInst.cpp [NFC] Remove some dead code: 2016-05-11 16:38:40 +00:00
IRBuilder.cpp Revert "Support arbitrary addrspace pointers in masked load/store intrinsics" 2016-04-14 08:47:17 +00:00
IRPrintingPasses.cpp Recommit r256952 "Filtering IR printing for print-after-all/print-before-all" 2016-01-06 22:55:03 +00:00
LegacyPassManager.cpp Remove doInitialization() and doFinalization() member declarations without definitions. 2016-04-28 19:21:30 +00:00
LLVMBuild.txt
LLVMContext.cpp [llc] New diagnostic handler 2016-05-16 14:28:02 +00:00
LLVMContextImpl.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
LLVMContextImpl.h DebugInfo: Remove MDString-based type references 2016-04-23 21:08:00 +00:00
Mangler.cpp Update to use new name alignTo(). 2016-01-14 21:06:47 +00:00
MDBuilder.cpp [MDBuilder] Simplify code using initializer lists. NFC. 2015-11-22 18:03:17 +00:00
Metadata.cpp [CodeGenPrepare] use branch weight metadata to decide if a select should be turned into a branch 2016-04-26 17:11:17 +00:00
MetadataImpl.h DI: Disallow uniquable DICompileUnits 2015-08-03 17:26:41 +00:00
Module.cpp Add "PIE Level" metadata to module flags. 2016-04-28 18:15:44 +00:00
ModuleSummaryIndex.cpp [ThinLTO] Introduce typedef for commonly-used map type (NFC) 2016-04-25 21:09:51 +00:00
Operator.cpp [opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType. 2016-01-19 17:28:00 +00:00
OptBisect.cpp Removing unused function. 2016-04-22 22:24:20 +00:00
Pass.cpp Re-commit optimization bisect support (r267022) without new pass manager support. 2016-04-22 22:06:11 +00:00
PassManager.cpp [PM] Implement the final conclusion as to how the analysis IDs should 2016-03-11 10:22:49 +00:00
PassRegistry.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ProfileSummary.cpp Remove specializations of ProfileSummary 2016-05-19 21:53:28 +00:00
Statepoint.cpp Introduce an GCRelocateInst class [NFC] 2016-04-12 18:05:10 +00:00
SymbolTableListTraitsImpl.h IR: Remove implicit iterator conversions from lib/IR, NFC 2015-10-08 23:49:46 +00:00
Type.cpp [IR] Mark the Type subclass helper methods 'inline' and move their definitions to DerivedTypes.h so they can be inlined by the compiler. 2015-12-25 04:06:20 +00:00
TypeFinder.cpp Re-reapply "[IR] Move optional data in llvm::Function into a hungoff uselist" 2015-12-19 08:52:49 +00:00
Use.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
User.cpp [IR] Teach llvm::User to co-allocate a descriptor. 2015-09-24 01:00:49 +00:00
Value.cpp NFC. Introduce Value::isPointerDereferenceable 2016-05-11 14:43:28 +00:00
ValueSymbolTable.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 20:50:44 +00:00
ValueTypes.cpp Add isScalarInteger helper to EVT/MVT 2016-03-01 18:01:28 +00:00
Verifier.cpp Port the strip-invalid-debuginfo logic to the legacy verifier pass, too. 2016-05-25 21:33:20 +00:00