[Attributor][FIX] Consistently use the access/remote instruction
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 12 Jan 2023 23:19:35 +0000 (15:19 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 12 Jan 2023 23:21:34 +0000 (15:21 -0800)
commit8b4e1287acfb3c31c235bc2d1d0da1547e168afb
treeaab2e60f34bc54e791837b980ee5a6ba8d5f68ed
parentf70a81cced3a45594c40affd7fd94792bdf2d5d2
[Attributor][FIX] Consistently use the access/remote instruction

We use the actual access (=remote) instruction when reasoning about
accesses, except for one leftover use case of the local instruction.
This caused us to potentially ignore the dominating write if the read
and write were in a different function than the (stack) allocation.

Reported by @ye-luo
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/test/Transforms/Attributor/value-simplify-dominance.ll