forked from OSchip/llvm-project
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) llvm-svn: 310495
This commit is contained in:
parent
cd3b9fedc7
commit
7829506731
|
@ -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.
|
||||
|
|
|
@ -837,7 +837,7 @@ AliasResult CFLAndersAAResult::query(const MemoryLocation &LocA,
|
|||
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.
|
||||
|
|
Loading…
Reference in New Issue