[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:59:01 PST 2017


On Mon, Feb 27, 2017 at 9:58 AM, Daniel Berlin <dberlin at dberlin.org> wrote:

>
>> 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.
>
s/instruction/location

> For a range, it sees if the range contains the location ,etc.
>
> For an instruction, it could try to get a definite location, and then call
the private thing that knows how to answer about definite locations, 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/b151e03d/attachment.html>


More information about the llvm-commits mailing list