When removing a function from the function set and adding it to deferred, we
authorNick Lewycky <nicholas@mxc.ca>
Wed, 9 Feb 2011 06:32:02 +0000 (06:32 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Wed, 9 Feb 2011 06:32:02 +0000 (06:32 +0000)
commit3ba974a1c535563bff9a160996ad015a2a56cc05
tree69b63cd233cc35d62b62475080d58246a0dd9ae2
parentf287f01cd11bef94ff90433d2dfe27b78c0f9f4c
When removing a function from the function set and adding it to deferred, we
could end up removing a different function than we intended because it was
functionally equivalent, then end up with a comparison of a function against
itself in the next round of comparisons (the one in the function set and the
one on the deferred list). To fix this, I introduce a choice in the form of
comparison for ComparableFunctions, either normal or "pointer only" used to
find exact Function*'s in lookups.

Also add some debugging statements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125180 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/MergeFunctions.cpp
test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll [new file with mode: 0644]