[PATCH] D25542: GVN-hoist: avoid calling MemoryLocation::get() on a call (PR30499)

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 22:32:54 PST 2016


On Mon, Nov 7, 2016 at 6:08 PM, Daniel Berlin <dberlin at dberlin.org> wrote:

>
>
> On Mon, Nov 7, 2016 at 5:37 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>
>> Hi Danny,
>>
>> MemoryLocation does not apply to calls directly because a call can easily
>> affect multiple locations.
>
>
>
> Yes, but people often just want to  know "does instruction def/ref/nothing
> the memory of other instruction"
>
>

> They don't often want to care about exactly what type of instruction they
> are holding in their hand, and at least right now, it doesn't just work all
> the time, you have to know what you are holding in your hands.
>
> They also don't often care about specific locations.
>
> If we think we can make that work all the time, awesome, let's do that.
>

If you want a motivating use case, look at the mess that MemorySSA.cpp has
to try to get answers to a simple question like "Is the memory of this
instruction used/def'd by this other instruction"  (see
instructionClobbersQuery, etc) with any sort of accuracy.

It's consistent with the machinations others try to go through as well.
In a perfect world, we have an API hides stuff like this.

(i'll ignore the phi translation part, which, arguably, may or may not
belong in that implementation)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161107/715e3ad7/attachment.html>


More information about the llvm-commits mailing list