llvm
b6d7afe5 - [DA] Remove calls to the GCD MIV test from `testSIV` (#187220)

Commit
6 days ago
[DA] Remove calls to the GCD MIV test from `testSIV` (#187220) This patch removes all invocations of the GCD MIV test in `testSIV` function, specifically: - If both the source and destination are addrecs, replace the call to the GCD MIV test with the Exact SIV test. Generally, the Exact SIV test has a narrower applicability than the GCD MIV test (both the source and destination must be affine addrecs), while the former likely yields a more precise result. Therefore, in this case, there's no reason to use the GCD MIV test. This replacement also means that previously the Exact SIV test was called conditionally (only when the Strong and Weak Crossing SIV tests are not applicable), but now it will be called unconditionally when both the source and destination are addrecs. - If either the source or the destination is loop-invariant, simply remove the call to the GCD MIV test without replacing it with anything. In this case, the Weak Zero SIV test will be invoked, and part of that test performs almost the same analysis as the GCD MIV test. Therefore, the GCD MIV test should be redundant in nearly all cases. This patch introduces two types of changes to the analysis results. First, it fixes several correctness issues that were caused by defects in the GCD MIV test. Second, it makes the analysis more precise in some cases. This improvement comes from the fact that, when both the source and destination are affine addrecs, the Exact SIV test is now invoked unconditionally, whereas previously it was only invoked conditionally.
Author
Parents
Loading