[llvm] r310495 - CFLAA: return MustAlias when pointers p, q are equal, i.e.,
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 10:02:18 PDT 2017
Author: nlopes
Date: Wed Aug 9 10:02:18 2017
New Revision: 310495
URL: http://llvm.org/viewvc/llvm-project?rev=310495&view=rev
Log:
CFLAA: return MustAlias when pointers p, q are equal, i.e.,
must-alias(p, sz_p, p, sz_q) irrespective of access sizes sz_p, sz_q
As discussed a couple of weeks ago on the ML.
This makes the behavior consistent with that of BasicAA.
AA clients already check the obj size themselves and may not require the
obj size to match exactly the access size (e.g., in case of store forwarding)
Modified:
llvm/trunk/include/llvm/Analysis/CFLSteensAliasAnalysis.h
llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp
Modified: llvm/trunk/include/llvm/Analysis/CFLSteensAliasAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/CFLSteensAliasAnalysis.h?rev=310495&r1=310494&r2=310495&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/CFLSteensAliasAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/CFLSteensAliasAnalysis.h Wed Aug 9 10:02:18 2017
@@ -68,7 +68,7 @@ public:
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB) {
if (LocA.Ptr == LocB.Ptr)
- return LocA.Size == LocB.Size ? MustAlias : PartialAlias;
+ return MustAlias;
// Comparisons between global variables and other constants should be
// handled by BasicAA.
Modified: llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp?rev=310495&r1=310494&r2=310495&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/CFLAndersAliasAnalysis.cpp Wed Aug 9 10:02:18 2017
@@ -837,7 +837,7 @@ AliasResult CFLAndersAAResult::query(con
AliasResult CFLAndersAAResult::alias(const MemoryLocation &LocA,
const MemoryLocation &LocB) {
if (LocA.Ptr == LocB.Ptr)
- return LocA.Size == LocB.Size ? MustAlias : PartialAlias;
+ return MustAlias;
// Comparisons between global variables and other constants should be
// handled by BasicAA.
More information about the llvm-commits
mailing list