[MergeFunc] removeUsers: call remove() only on direct users
removeUsers uses a work list to collect indirect users and call remove()
on those functions. However it has a bug (`if (!Visited.insert(UU).second)`).
Actually, we don't have to collect indirect users.
After the merge of F and G, G's callers will be considered (added to
Deferred). If G's callers can be merged, G's callers' callers will be
Update the test unnamed-addr-reprocessing.ll to make it clear we can
still merge indirect callers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358741 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed