[PATCH] D139601: [LoopDistribute] Clear cache of `LoopAccessInfoManager`
Miguel Saldivar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 14:28:45 PST 2022
Saldivarcher added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopDistribute.cpp:995
Changed |= LDL.processLoop();
+ LAIs.clear();
}
----------------
fhahn wrote:
> Saldivarcher wrote:
> > fhahn wrote:
> > > We only need to clear if changes were made AFAICT
> > The assertion is still hit if we only clear when changes are made, I think it's because we insert the loop [[ https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Scalar/LoopDistribute.cpp#L681 | here ]], then fail right after. So, there's still cached data when there are no changes made. Keep in mind that the LoopDistribute pass fails with all the loops, and all fail [[ https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/Scalar/LoopDistribute.cpp#L686 | here. ]]
> Right, this indicates that `LoopDistribute` isn't the right place to fix it. We should only need invalidation *after* the IR changes. If the IR stays the same, there should be no issue with the cached loop-info objects.
>
> I think the right place to invalidate here is in `LoopVectorize's` `runImpl`.
When you mean invalidate, do you mean to clear the cache within LoopAccessInfoMap?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139601/new/
https://reviews.llvm.org/D139601
More information about the llvm-commits
mailing list