[PATCH] D38862: Add must alias info to ModRefInfo.

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 12 15:40:02 PDT 2017


asbirlea created this revision.
Herald added a subscriber: sanjoy.

Add an additional bit to ModRefInfo, MRI_Must, to be set for known must aliases.
Conservatively this bit will not be set (equivalent to MayAlias or NoAlias).

Notes:

- MRI_Must is almost entirely set in the AAResults methods, the remaining changes are trying to preserve it.
- Only some small changes to make custom AA passes set MRI_Must (BasicAA).
- GlobalsModRef already declares a bit of the same value as MRI_Must (MayReadAnyGlobal). No changes to shift the value of MayReadAnyGlobal (see AlignedMap). FunctionInfo.getModRef() masks out everything except MRI_ModRef, so correctness is preserved, but the MRI_Must info is not set/used.
- There are cases where the MRI_Must is not set, e.g. 2 calls that only read will return MRI_NoModRef, though they may read from exactly the same location.


https://reviews.llvm.org/D38862

Files:
  include/llvm/Analysis/AliasAnalysis.h
  lib/Analysis/AliasAnalysis.cpp
  lib/Analysis/AliasAnalysisEvaluator.cpp
  lib/Analysis/AliasSetTracker.cpp
  lib/Analysis/BasicAliasAnalysis.cpp
  lib/Analysis/GlobalsModRef.cpp
  lib/Analysis/MemoryDependenceAnalysis.cpp
  lib/Analysis/MemorySSA.cpp
  lib/Transforms/Scalar/DeadStoreElimination.cpp
  lib/Transforms/Scalar/MemCpyOptimizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38862.118852.patch
Type: text/x-patch
Size: 24758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171012/a75b2b99/attachment.bin>


More information about the llvm-commits mailing list