"llvm/lib/git@repo.hca.bsc.es:lalbano/llvm-bpevl.git" did not exist on "641d8a06bdf6a503355d55b7a0e993a979787696"
[MSSA] Add an overload for getClobberingMemoryAccess.
A seemingly common use for the walker's getClobberingMemoryAccess function is: ``` MemoryAccess *getClobber(MemorySSAWalker *W, MemoryUseOrDef *MUD) { const Instruction *I = MUD->getMemoryInst(); return W->getClobberingMemoryAccess(I); } ``` Which is kind of redundant, since walkers will ultimately query MSSA to find out which MemoryAccess `I` maps to (...which is always `MUD`). So, this patch adds an overload of getClobberingMemoryAccess that accepts MemoryAccesses directly. As a result, the Instruction overload of getClobberingMemoryAccess becomes a lightweight wrapper around our new overload. Additionally, this patch un`virtual`izes the Instruction overload of getClobberingMemoryAccess, since there doesn't seem to be a walker that benefits from that being virtual, and I can't think of how else one would implement it. Happy to make it virtual again if we would benefit from doing so. llvm-svn: 276169
Loading
Please register or sign in to comment