Add an "are types equivalent" operation that ignores the types that a pointer
authorNick Lewycky <nicholas@mxc.ca>
Fri, 12 Jun 2009 08:04:51 +0000 (08:04 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 12 Jun 2009 08:04:51 +0000 (08:04 +0000)
commit287de607dc3e05aa287edf4e3b6aa29e6c4517c9
treedd63f5ed1bbdd8d13d5efc83f709605bf75dff86
parentc55c27fa1668ea13e6c98c808176451d841f713f
Add an "are types equivalent" operation that ignores the types that a pointer
points to while analyzing all other fields.

Use FoldingSetNodeID to produce a good hash. This dramatically decreases run
times.

Emit thunks. This means that it can look at all functions regardless of what
the linkage is or if the address is taken, but unfortunately some small
functions can be even shorter than the thunk because our backend doesn't yet
realize it can just turn these into jumps. This means that this pass will
pessimize code on average.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73222 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/MergeFunctions.cpp