Add an "are types equivalent" operation that ignores the types that a pointer
commit270132623116c918337f216f6006a8be6f67d55e
authorNick Lewycky <nicholas@mxc.ca>
Fri, 12 Jun 2009 08:04:51 +0000 (12 08:04 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 12 Jun 2009 08:04:51 +0000 (12 08:04 +0000)
treedd63f5ed1bbdd8d13d5efc83f709605bf75dff86
parent4c5d8f080e3cff143f7cf7c42e151340cf5abb00
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