[PATCH] D30369: Allow None as a MemoryLocation to getModRefInfo, use it to start cleaning up interfaces and uses

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 09:58:00 PST 2017


>
>
> Even if that is really "MLocOrCall becomes the new MemoryLocation".
>
>
THe other easy option i see is that we have

struct AbstractHeapPiece
{
}
struct AbstractHeapDefiniteLocation : public AbstractHeapPiece (this is
MemoryLocation)
{
}
struct AbstractHeapLocationRange : ..
{
}
struct AbstractHeapTouchedByCallsite : ...
{
ImmutableCallSite ...
}
struct AbstractHeapTouchedByInstruction : ...
{
Instruction *...
}


Then we just have getmodrefinfo figure out how to give the best answer. So
if you ask it about a definite location and a touched by callsite, it tries
to see if the callsite touches that instruction. For a range, it sees if
the range contains the location ,etc.

This obviates our need for 600 public apis for getmodrefinfo, and that the
caller know what it is holding.

Mapping is just abstractheappiece to whatever you want.




>
> https://reviews.llvm.org/D30369
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170227/6b5a98d5/attachment.html>


More information about the llvm-commits mailing list