HomePhabricator

[MergeFuncs] Call removeUsers() prior to unnamed_addr RAUW

Description

[MergeFuncs] Call removeUsers() prior to unnamed_addr RAUW

Summary:
For unnamed_addr functions we RAUW instead of only replacing direct callers. However, functions in which replacements were performed currently are not added back to the worklist, resulting in missed merging opportunities.

Fix this by calling removeUsers() prior to RAUW.

Reviewers: jfb, whitequark

Reviewed By: whitequark

Subscribers: rkruppe, llvm-commits

Differential Revision: https://reviews.llvm.org/D53262

Details