[PATCH] D87490: [MachineInstr] return mayAlias for not mayLoadOrStore instructions.

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 07:39:31 PDT 2020


shchenz added a comment.

> So why are we adding dead code then?

I think this is necessary for the `mayAlias` interface. Alias query always contains the query for a call instruction. If we call this interface based on MIR for a call instruction, we get a wrong result. This was from my development, I originally thought this function can handle call instruciton, but as a result it can not. so I called this interface and my codes made some loads sink down crossing a call instruction. This was not right. The call alters the memory where the loads got content.

So I think we need to add more conditions in `mayAlias` interface.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87490/new/

https://reviews.llvm.org/D87490



More information about the llvm-commits mailing list