FailedChanges

Summary

  1. [analyzer] Fix off-by-one in operator call parameter binding. (details)
  2. [LVI][CVP] LazyValueInfoImpl::solveBlockValueBinaryOp(): use no-wrap (details)
  3. [LVI][NFC] Factor solveBlockValueSaturatingIntrinsic() out of (details)
Commit be86fdb86e1efd6921c81f25ac0c0a78903c0a2d by Artem Dergachev
[analyzer] Fix off-by-one in operator call parameter binding.
Member operator declarations and member operator expressions have
different numbering of parameters and arguments respectively: one of
them includes "this", the other does not.
Account for this inconsistency when figuring out whether the parameter
needs to be manually rebound from the Environment to the Store when
entering a stack frame of an operator call, as opposed to being
constructed with a constructor and as such already having the necessary
Store bindings.
Differential Revision: https://reviews.llvm.org/D69155
The file was modifiedclang/test/Analysis/temporaries.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/CallEvent.cpp
Commit 1f665046fbf3b9d47a229714f689cd941f6f1216 by lebedev.ri
[LVI][CVP] LazyValueInfoImpl::solveBlockValueBinaryOp(): use no-wrap
flags from `add` op
Summary: This was suggested in https://reviews.llvm.org/D69277#1717210
In this form (this is what was suggested, right?), the results aren't
staggering
(especially since given LVI cross-block focus) this does catch some
things (as per test-suite), but not too much:
| statistic                                        |       old |     
new | delta | % change |
| correlated-value-propagation.NumAddNSW           |      4981 |    
4982 |     1 |  0.0201% |
| correlated-value-propagation.NumAddNW            |     12125 |   
12126 |     1 |  0.0082% |
| correlated-value-propagation.NumCmps             |      1199 |    
1202 |     3 |  0.2502% |
| correlated-value-propagation.NumDeadCases        |       112 |     
111 |    -1 | -0.8929% |
| correlated-value-propagation.NumMulNSW           |       275 |     
278 |     3 |  1.0909% |
| correlated-value-propagation.NumMulNUW           |      1323 |    
1326 |     3 |  0.2268% |
| correlated-value-propagation.NumMulNW            |      1598 |    
1604 |     6 |  0.3755% |
| correlated-value-propagation.NumNSW              |      7158 |    
7167 |     9 |  0.1257% |
| correlated-value-propagation.NumNUW              |     13304 |   
13310 |     6 |  0.0451% |
| correlated-value-propagation.NumNW               |     20462 |   
20477 |    15 |  0.0733% |
| correlated-value-propagation.NumOverflows        |         4 |       
7 |     3 | 75.0000% |
| correlated-value-propagation.NumPhis             |     15366 |   
15381 |    15 |  0.0976% |
| correlated-value-propagation.NumSExt             |      6273 |    
6277 |     4 |  0.0638% |
| correlated-value-propagation.NumShlNSW           |      1172 |    
1171 |    -1 | -0.0853% |
| correlated-value-propagation.NumShlNUW           |      2793 |    
2794 |     1 |  0.0358% |
| correlated-value-propagation.NumSubNSW           |       730 |     
736 |     6 |  0.8219% |
| correlated-value-propagation.NumSubNUW           |      2044 |    
2046 |     2 |  0.0978% |
| correlated-value-propagation.NumSubNW            |      2774 |    
2782 |     8 |  0.2884% |
| instcount.NumAddInst                             |    277586 |  
277569 |   -17 | -0.0061% |
| instcount.NumAndInst                             |     66056 |   
66054 |    -2 | -0.0030% |
| instcount.NumBrInst                              |    709147 |  
709146 |    -1 | -0.0001% |
| instcount.NumCallInst                            |    528579 |  
528576 |    -3 | -0.0006% |
| instcount.NumExtractValueInst                    |     18307 |   
18301 |    -6 | -0.0328% |
| instcount.NumOrInst                              |    102660 |  
102665 |     5 |  0.0049% |
| instcount.NumPHIInst                             |    318008 |  
318007 |    -1 | -0.0003% |
| instcount.NumSelectInst                          |     46373 |   
46370 |    -3 | -0.0065% |
| instcount.NumSExtInst                            |     79496 |   
79488 |    -8 | -0.0101% |
| instcount.NumShlInst                             |     40654 |   
40657 |     3 |  0.0074% |
| instcount.NumTruncInst                           |     62251 |   
62249 |    -2 | -0.0032% |
| instcount.NumZExtInst                            |     68211 |   
68221 |    10 |  0.0147% |
| instcount.TotalBlocks                            |    843910 |  
843909 |    -1 | -0.0001% |
| instcount.TotalInsts                             |   7387448 | 
7387423 |   -25 | -0.0003% |
Reviewers: nikic, reames
Reviewed By: nikic
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D69321
The file was modifiedllvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp
The file was modifiedllvm/lib/IR/ConstantRange.cpp
The file was modifiedllvm/include/llvm/IR/ConstantRange.h
Commit 8eda8f8ce85eddf24ff4dbf9783771d6b15db27c by lebedev.ri
[LVI][NFC] Factor solveBlockValueSaturatingIntrinsic() out of
solveBlockValueIntrinsic()
Now that there's SaturatingInst class, this is cleaner.
The file was modifiedllvm/lib/Analysis/LazyValueInfo.cpp