[PATCH] D134739: [SCEVExpander] Check expr is available for traversed InsterPts.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 13:41:24 PDT 2022


efriedma added a comment.

Maybe we should restructure the InsertedExpressions cache so it's more likely to consistently hit?

Insertion points fall into the following categories:

- A passed-in arbitrary point.
- The beginning of a basic block.
- The end of a basic block.

The values are then adjusted in some cases: if the insertion point points at an inserted instruction, we adjust forward to try to reuse those instructions.

For the "beginning of a basic block" case, it doesn't really make sense to track the exact instruction where we can actually insert instructions; all that matters is that it's the "beginning".  If we fix that, it should ensure we hit the cache reliably for those cases.

Doing multiple cache lookups like the current patch may sort of work in this case, but it's not clear in general why we would expect the unadjusted insertion point to be in the cache.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134739



More information about the llvm-commits mailing list