[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not...
authorEvgeniy Brevnov <evgueni.brevnov@gmail.com>
Thu, 16 Jan 2020 08:17:43 +0000 (15:17 +0700)
committerEvgeniy Brevnov <evgueni.brevnov@gmail.com>
Fri, 14 Feb 2020 05:18:31 +0000 (12:18 +0700)
commit5573abceab5eb9c6964b7249eae21f80a88ebf2e
tree76ee6d52a521a921fb1d098dce38fe97b205753b
parent105a270028abb7a0237dd2af3ddba07471d8c49d
[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses(PR42151).

Summary:
This is second attempt to fix the problem with incorrect dependencies reported in presence of invariant load. Initial fix (https://reviews.llvm.org/D64405) was reverted due to a regression reported in https://reviews.llvm.org/D70516.

The original fix changed caching behavior for invariant loads. Namely such loads are not put into the second level cache (NonLocalDepInfo). The problem with that fix is the first level cache  (CachedNonLocalPointerInfo) still works as if invariant loads were in the second level cache. The solution is in addition to not putting dependence results into the second level cache avoid putting info about invariant loads into the first level cache as well.

Reviewers: jdoerfert, reames, hfinkel, efriedma

Reviewed By: jdoerfert

Subscribers: DaniilSuchkov, hiraditya, bmahjour, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73027
llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
llvm/test/Analysis/MemoryDependenceAnalysis/InvariantLoad.ll [new file with mode: 0644]