[PATCH] D155049: [ScalarEvolution] Infer loop max trip count from memory accesses

Liren.Peng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 01:26:34 PDT 2023


Peakulorain added a comment.

Hi, All,
This patch is a fixed commit.
Related to:
https://reviews.llvm.org/D109821
https://reviews.llvm.org/D113554

In order to infer this trip count, I divide the process into the following steps:

1. Collect the load/store instructions that are executed on each iteration of the loop;
2. Filter out Reads/Write that may overlap;
3. Calculate the possible wrap value for each Ptr index and record the smaller one;
4. Infer the maximum number of executables from the total memory size/step value;
5. Compare the calculated value with the smaller wrap value in the index to ensure that the step is strictly increasing.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155049/new/

https://reviews.llvm.org/D155049



More information about the llvm-commits mailing list