[Attributor][FIX] Recursion via memory needs to be tracked explicitly
authorJohannes Doerfert <johannes@jdoerfert.de>
Tue, 17 Aug 2021 06:37:29 +0000 (01:37 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Fri, 27 Aug 2021 18:12:13 +0000 (13:12 -0500)
commite05940de2a76df8ce77f943d9b8bc81322a03354
tree2c74ef5144380b3a57cc59539d221ca25b9c70b7
parentcaa3b28260cf4af02a4a684921e1fecf0e44725a
[Attributor][FIX] Recursion via memory needs to be tracked explicitly

Recursion can happen when we see a PHI use the second time or when we
look at a store value operand use again. We already visited the
potential copies and doing so again will just cause endless looping.

Reviewed By: kuter

Differential Revision: https://reviews.llvm.org/D108190
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll