OSDN Git Service

MergeFunctions Pass, introduced total ordering among values.
authorStepan Dyatkovskiy <stpworld@narod.ru>
Wed, 7 May 2014 11:11:39 +0000 (11:11 +0000)
committerStepan Dyatkovskiy <stpworld@narod.ru>
Wed, 7 May 2014 11:11:39 +0000 (11:11 +0000)
commit9b363106f3546e4b91c25d702561f5469949aba3
treec5973851fe6b996297d16315943f14a94e64b1de
parent0d427515b3005e3cbf6b82923fbdd5ffa27f4a97
MergeFunctions Pass, introduced total ordering among values.

This is a third patch of patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).

This patch description:
Being comparing functions we need to compare values we meet at left and
right sides.
Its easy to sort things out for external values. It just should be
the same value at left and right.
But for local values (those were introduced inside function body)
we have to ensure they were introduced at exactly the same place,
and plays the same role.

In short, patch introduces values serial numbering and comparison routine.
The last one compares two values by their serial numbers.

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