diff options
author | Fangrui Song <maskray@google.com> | 2019-04-19 07:57:51 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-04-19 07:57:51 +0000 |
commit | 884f557bb216030769d40c00f55977e262b761a4 (patch) | |
tree | b4ef2be41db8ab5bd8bbd9ecf16d6f970b044a96 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 72e2960e525a30bd8a105bd474b5c38267de02fc (diff) | |
download | llvm-884f557bb216030769d40c00f55977e262b761a4.zip llvm-884f557bb216030769d40c00f55977e262b761a4.tar.gz llvm-884f557bb216030769d40c00f55977e262b761a4.tar.bz2 |
[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
considered.
Update the test unnamed-addr-reprocessing.ll to make it clear we can
still merge indirect callers.
llvm-svn: 358741
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
0 files changed, 0 insertions, 0 deletions