llvm-project/llvm/lib/Transforms/Scalar
Roman Lebedev 7cd7f4a83b [CVP] No-wrap deduction for `shl`
Summary:
This is the last `OverflowingBinaryOperator` for which we don't deduce flags.
D69217 taught `ConstantRange::makeGuaranteedNoWrapRegion()` about it.

The effect is better than of the `mul` patch (D69203):

| statistic                              |     old |     new | delta | % change |
| correlated-value-propagation.NumAddNUW |    7145 |    7144 |    -1 | -0.0140% |
| correlated-value-propagation.NumAddNW  |   12126 |   12125 |    -1 | -0.0082% |
| correlated-value-propagation.NumAnd    |     443 |     446 |     3 |  0.6772% |
| correlated-value-propagation.NumNSW    |    5986 |    7158 |  1172 | 19.5790% |
| correlated-value-propagation.NumNUW    |   10512 |   13304 |  2792 | 26.5601% |
| correlated-value-propagation.NumNW     |   16498 |   20462 |  3964 | 24.0272% |
| correlated-value-propagation.NumShlNSW |       0 |    1172 |  1172 |          |
| correlated-value-propagation.NumShlNUW |       0 |    2793 |  2793 |          |
| correlated-value-propagation.NumShlNW  |       0 |    3965 |  3965 |          |
| instcount.NumAShrInst                  |   13824 |   13790 |   -34 | -0.2459% |
| instcount.NumAddInst                   |  277584 |  277586 |     2 |  0.0007% |
| instcount.NumAndInst                   |   66061 |   66056 |    -5 | -0.0076% |
| instcount.NumBrInst                    |  709153 |  709147 |    -6 | -0.0008% |
| instcount.NumICmpInst                  |  483709 |  483708 |    -1 | -0.0002% |
| instcount.NumSExtInst                  |   79497 |   79496 |    -1 | -0.0013% |
| instcount.NumShlInst                   |   40691 |   40654 |   -37 | -0.0909% |
| instcount.NumSubInst                   |   61997 |   61996 |    -1 | -0.0016% |
| instcount.NumZExtInst                  |   68208 |   68211 |     3 |  0.0044% |
| instcount.TotalBlocks                  |  843916 |  843910 |    -6 | -0.0007% |
| instcount.TotalInsts                   | 7387528 | 7387448 |   -80 | -0.0011% |

Reviewers: nikic, reames, sanjoy, timshen

Reviewed By: nikic

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69277

llvm-svn: 375455
2019-10-21 21:31:19 +00:00
..
ADCE.cpp [ADCE] Fix non-deterministic behaviour due to iterating over a pointer set. 2019-07-16 15:23:10 +00:00
AlignmentFromAssumptions.cpp [Alignment][NFC] Remove StoreInst::setAlignment(unsigned) 2019-10-03 13:17:21 +00:00
BDCE.cpp [BDCE] Optimize find+insert with early insert 2019-03-07 06:38:03 +00:00
CMakeLists.txt Reapply r374743 with a fix for the ocaml binding 2019-10-14 16:15:14 +00:00
CallSiteSplitting.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
ConstantHoisting.cpp ConstantHoisting - Silence static analyzer dyn_cast<PointerType> null dereference warning. NFCI. 2019-09-22 17:45:05 +00:00
ConstantProp.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
CorrelatedValuePropagation.cpp [CVP] No-wrap deduction for `shl` 2019-10-21 21:31:19 +00:00
DCE.cpp [LegacyPassManager] Deprecate the BasicBlockPass/Manager. 2019-09-30 20:17:23 +00:00
DeadStoreElimination.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
DivRemPairs.cpp [DivRemPairs] Don't assert that we won't ever get expanded-form rem pairs in different BB's (PR43500) 2019-09-29 15:25:24 +00:00
EarlyCSE.cpp [EarlyCSE] Pass preserves AA. 2019-09-30 17:08:40 +00:00
FlattenCFGPass.cpp Don't use invalidated iterators in FlattenCFGPass 2019-09-19 19:39:42 +00:00
Float2Int.cpp [Float2Int] avoid crashing on unreachable code (PR38502) 2019-09-19 16:31:17 +00:00
GVN.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
GVNHoist.cpp GVNHoist - silence static analyzer dyn_cast<> null dereference warning in hasEHOrLoadsOnPath call. NFCI. 2019-10-21 17:15:49 +00:00
GVNSink.cpp [GVNSink] Add unary FNeg support to GVNSink pass 2019-06-28 19:57:31 +00:00
GuardWidening.cpp GuardWidening - silence static analyzer null dereference warning with assertion. NFCI. 2019-10-21 17:15:37 +00:00
IVUsersPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IndVarSimplify.cpp IndVarSimplify - silence static analyzer dyn_cast<> null dereference warning. NFCI. 2019-10-21 17:15:05 +00:00
InductiveRangeCheckElimination.cpp Delete dead stores 2019-07-12 14:58:15 +00:00
InferAddressSpaces.cpp InferAddressSpaces: Move target intrinsic handling to TTI 2019-08-14 18:13:00 +00:00
InstSimplifyPass.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
JumpThreading.cpp JumpThreadingPass::UnfoldSelectInstr - silence static analyzer dyn_cast<> null dereference warning. NFCI. 2019-10-17 11:19:41 +00:00
LICM.cpp [Alignment][NFC] Finish transition for `Loads` 2019-10-21 15:10:26 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoopAccessAnalysisPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoopDataPrefetch.cpp Allow prefetching from non-zero address spaces 2019-07-25 16:11:57 +00:00
LoopDeletion.cpp [SCEV] Rename getMaxBackedgeTakenCount to getConstantMaxBackedgeTakenCount [NFC] 2019-08-14 21:58:13 +00:00
LoopDistribute.cpp LoopDistribute/LAA: Respect convergent 2019-06-12 13:34:19 +00:00
LoopFuse.cpp [LoopFusion] Add ability to fuse guarded loops 2019-09-26 21:42:45 +00:00
LoopIdiomRecognize.cpp [LoopIdiom] BCmp: check, not assert that loop exits exit out of the loop (PR43687) 2019-10-17 11:01:29 +00:00
LoopInstSimplify.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
LoopInterchange.cpp [LoopInterchange] Drop unused splitInnerLoopHeader declaration. 2019-09-11 10:32:15 +00:00
LoopLoadElimination.cpp LoopLoadElim: Respect convergent 2019-06-12 13:50:47 +00:00
LoopPassManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoopPredication.cpp [Instruction] Add hasMetadata(Kind) helper [NFC] 2019-09-04 17:28:48 +00:00
LoopRerollPass.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
LoopRotation.cpp [LoopRotate] Unconditionally get DomTree. 2019-10-08 11:54:42 +00:00
LoopSimplifyCFG.cpp [MemorySSA] Loop passes should mark MSSA preserved when available. 2019-08-17 01:02:12 +00:00
LoopSink.cpp [IR] Value: add replaceUsesWithIf() utility 2019-08-01 12:32:08 +00:00
LoopStrengthReduce.cpp recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize 2019-10-12 02:53:04 +00:00
LoopUnrollAndJamPass.cpp [Unroll] Do NOT unroll a loop with small runtime upperbound 2019-09-26 21:40:27 +00:00
LoopUnrollPass.cpp [Unroll] Do NOT unroll a loop with small runtime upperbound 2019-09-26 21:40:27 +00:00
LoopUnswitch.cpp [NFC] Fix unused var in release builds 2019-10-16 23:09:56 +00:00
LoopVersioningLICM.cpp [Loop Utils] Move utilty addStringMetadataToLoop to LoopUtils.cpp. NFC. 2019-07-26 06:10:08 +00:00
LowerAtomic.cpp Transforms: lower fadd and fsub atomicrmw instructions 2019-05-23 17:03:43 +00:00
LowerConstantIntrinsics.cpp Reapply r374743 with a fix for the ocaml binding 2019-10-14 16:15:14 +00:00
LowerExpectIntrinsic.cpp LowerExpectIntrinsic handlePhiDef - silence static analyzer dyn_cast<PHINode> null dereference warning. NFCI. 2019-10-02 16:03:45 +00:00
LowerGuardIntrinsic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LowerWidenableCondition.cpp Update more files added with the old header to the new one. 2019-02-11 08:25:56 +00:00
MakeGuardsExplicit.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MemCpyOptimizer.cpp [MemCpyOpt] Fixing Incorrect Code Motion while Handling Aggregate Type Values 2019-10-21 10:00:34 +00:00
MergeICmps.cpp Revert "Reland "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline."" 2019-09-10 10:39:09 +00:00
MergedLoadStoreMotion.cpp [MergedLoadStoreMotion] Sink stores to BB with more than 2 predecessors 2019-09-05 17:00:32 +00:00
NaryReassociate.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
NewGVN.cpp [NewGVN] Check that call has an access. 2019-10-15 17:25:36 +00:00
PartiallyInlineLibCalls.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
PlaceSafepoints.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
Reassociate.cpp [Reassoc] Small fix to support unary FNeg in NegateValue(...) 2019-08-23 15:49:38 +00:00
Reg2Mem.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RewriteStatepointsForGC.cpp [Local] Remove unused LazyValueInfo pointer from removeUnreachableBlock. 2019-10-02 16:58:13 +00:00
SCCP.cpp SCCP - silence static analyzer dyn_cast<StructType> null dereference warning. NFCI. 2019-09-27 15:49:10 +00:00
SROA.cpp [Alignment][NFC] Finish transition for `Loads` 2019-10-21 15:10:26 +00:00
Scalar.cpp Reapply r374743 with a fix for the ocaml binding 2019-10-14 16:15:14 +00:00
Scalarizer.cpp [Scalarizer] Propagate IR flags 2019-06-21 14:10:18 +00:00
SeparateConstOffsetFromGEP.cpp Change TargetLibraryInfo analysis passes to always require Function 2019-09-07 03:09:36 +00:00
SimpleLoopUnswitch.cpp SimpleLoopUnswitch - fix uninitialized variable and null dereference warnings. NFCI. 2019-10-16 10:38:18 +00:00
SimplifyCFGPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Sink.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SpeculateAroundPHIs.cpp Ignore indirect branches from callbr. 2019-08-14 16:44:07 +00:00
SpeculativeExecution.cpp Support FNeg in SpeculativeExecution pass 2019-05-14 16:51:18 +00:00
StraightLineStrengthReduce.cpp [opaque pointer types] Pass value type to GetElementPtr creation. 2019-02-01 20:44:47 +00:00
StructurizeCFG.cpp [StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default 2019-08-06 14:30:19 +00:00
TailRecursionElimination.cpp [Alignment][NFC] Finish transition for `Loads` 2019-10-21 15:10:26 +00:00
WarnMissedTransforms.cpp [IR] Refactor attribute methods in Function class (NFC) 2019-04-04 22:40:06 +00:00