(original) (raw)
This was discussed a while back in the thread titled "alias set collapse and LICM".�Philip
On 07/28/2015 06:13 AM, Andrew Zhogin
wrote:
Hi all,
There is a problem about how AliasSetTracker merging AliasSet's when meet UnknownInst.
When adding new pointer it looks for existing AliasSet's aliased with new pointer. And merging them together. It is ok for pointers: if %A mayalias %B and %B mayalias %C then %A mayalias %C.
But the same logic when adding callsite is wrong (findAliasSetForUnknownInst).
Callsite may be known to readonly access one pointer and change the content of other pointer.Why to merge together two noalias pointers if they have some mod/ref relationships with common callsite?
If modrefinfo(%A, %call1) == REF and modrefinfo(%B, %call1) == MODit doesn't mean %A may/must alias %B.AliasSet's for %A and %B must stay independent with corrected access lattice: aliasset(%A).Access |= RefAccess, aliasset(%B).Access |= ModAccess.And I think new�UnknownInst must be added to both AliasSet's.
Or maybe UnknownInst's must be collected in central part - AliasSetTracker, not AliasSet's.
Am I right?\--
Best regards,Andrew Zhogin
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ LLVM Developers mailing list LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev