llvm-project
55a041ba - [DA] Move no-wrap flag check into checkSubscript (#190770)

Commit
14 days ago
[DA] Move no-wrap flag check into checkSubscript (#190770) Recent patches added no-wrap flag checks to each dependence test (except for the Banerjee MIV test) to make them sound. These fixes have been applied one by one to ensure that each dependence test was correctly updated and the defects were properly addressed. However, ideally, these functions should not be called at all when the required no-wrap flags are not set. Specifically, `classifyPair` should tag pairs as `NonLinear` when either addrec doesn't have the no-wrap flag, which means that the addrec is as literal non-linear. This patch moves the existing no-wrap flag checks in the each dependence test to `checkSubscript`, which is called by `classifyPair`. With this change, if the addrec doesn't have the no-wrap flag, the pair will be classified as `NonLinear` and the dependence test will not be invoked at all. I believe this change makes the code cleaner and consistent with the meaning of `NonLinear` classification. Note that this patch doesn't take care of the behavioral change caused by the Benerjee MIV test, as the test is still not sound and there are no plans to fix it in the near future.
Author
Parents
Loading