Second patch of patch series that improves MergeFunctions performance time from O...
authorStepan Dyatkovskiy <stpworld@narod.ru>
Wed, 7 May 2014 09:05:10 +0000 (09:05 +0000)
committerStepan Dyatkovskiy <stpworld@narod.ru>
Wed, 7 May 2014 09:05:10 +0000 (09:05 +0000)
commitcb3a147870ff5f9374792aeedf09a5ff73e632ec
treee031b1dbcbeb34df6b368a61c5b9573e64dda452
parent88ab50c23791442f13c72e331f0505f9fbb5046a
Second patch of patch series that improves MergeFunctions performance time from O(N*N) to
O(N*log(N)). The idea is to introduce total ordering among functions set.
It allows to build binary tree and perform function look-up procedure in O(log(N)) time.

This patch description:
Introduced total ordering among constants implemented in cmpConstants method.
Method performs lexicographical comparison between constants represented as
hypothetical numbers of next format:
<bitcastability-trait><raw-bit-contents>

Please, read cmpConstants declaration comments for more details.

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