[PATCH] D154323: [MemoryDependencyAnalysis] Delete cache infos if CacheInfo->size != Loc.size

luxufan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 2 23:51:48 PDT 2023


StephenFan created this revision.
StephenFan added reviewers: nikic, efriedma, reames, asbirlea, fhahn, ebrevnov.
Herald added a subscriber: hiraditya.
Herald added a project: All.
StephenFan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In the past, if the size value of CacheInfo was greater than Loc's size
value, the CacheInfo would not be dropped and we repalced Loc's size
with CacheInfo's size to compute the dependencies. However it caused two
problems:

1. With a greater Loc size, we might get a imprecise result which shows

in test GVN/PRE/rle.ll

2. If we have a pointer value that can be translated to a block

twice(%array.2.phi.2 in pr53599.ll), using a greater size may cause
dependencies of smaller size been added to greater size's CacheInfo. And
then some non-redundant load instructions would be deleted.

Compile time differences:https://llvm-compile-time-tracker.com/compare.php?from=18eb31c096167a1f6185f05338494c82a509ff9e&to=65fba50ce274460ad88f90e0ae29d36869e42d71&stat=instructions:u

Fixes: https://github.com/llvm/llvm-project/issues/63559


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154323

Files:
  llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
  llvm/test/Analysis/MemoryDependenceAnalysis/pr63559.ll
  llvm/test/Transforms/GVN/PRE/rle.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154323.536666.patch
Type: text/x-patch
Size: 11525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230703/f94d5ccf/attachment.bin>


More information about the llvm-commits mailing list