[LLVMdev] AliasSetTracker and UnknownInst's (callsites mostly) problem

Andrew Zhogin andrew.zhogin at gmail.com
Tue Jul 28 06:13:51 PDT 2015


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) == MOD
it 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150728/4e0ece51/attachment.html>


More information about the llvm-dev mailing list