[PATCH] D113160: [stack-safety] Check SCEV constraints at memory instructions.

Florian Mayer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 17:36:29 PST 2021


fmayer added a comment.

In D113160#3116741 <https://reviews.llvm.org/D113160#3116741>, @eugenis wrote:

> This looks nice. Any idea how much does it improve analysis success rate in practice?
>
> Would be great to have a test with some loop, if it works.

It doesn't support loops yet, I've been experimenting with `isKnownAtEveryIteration` without success so far. Will keep trying.



================
Comment at: llvm/lib/Analysis/StackSafetyAnalysis.cpp:401
         }
-        US.addRange(I,
-                    getAccessRange(UI, Ptr, DL.getTypeStoreSize(I->getType())));
+        auto TypeSize = DL.getTypeStoreSize(I->getType());
+        auto AccessRange = getAccessRange(UI, Ptr, TypeSize);
----------------
eugenis wrote:
> move getTypeStoreSize into getTypeSize
The way it is now makes it more obvious that this TypeSize is the same that we use in the `getAccessRange` call, so I'd prefer to leave it like this. WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113160



More information about the llvm-commits mailing list