[PATCH] D25476: GVN-hoist: fix store past load dependence analysis (PR30216, PR30499)

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 08:56:40 PDT 2016


On Tue, Oct 11, 2016 at 11:47 AM, Daniel Berlin <dberlin at dberlin.org> wrote:
> Can you just expose a version of static bool
> instructionClobbersQuery(MemoryDef *MD, MemoryUse *MU, const MemoryLocOrCall
> &UseMLOC, AliasAnalysis &AA) {
>
> That takes the mloc from the memory use?
>
> IE
> STH like:
>
> bool  MemorySSA::defClobbersUse(MemoryDef *MD, MemoryUse *MU) {
>    return instructionClobbersQuery(MD, MU, MemoryLocOrCall(MU), MSSA->AA);
> }
>

That is not easy: that's what got me frustrated back when the patch
got reverted.
That's also why I decided to copy and adapt the content of
instructionClobbersQuery()
to make it work on Instructions and not on MemoryDef and MemoryUse.

Also one things is that in my use-case, both instructions would be MemoryDefs,
which is not what instructionClobbersQuery checks for.


More information about the llvm-commits mailing list