1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
llvm-mirror/unittests/Transforms/Utils
Erik Eckstein 8bab9d126f Make the FunctionComparator of the MergeFunctions pass a stand-alone utility.
This is pure refactoring. NFC.

This change moves the FunctionComparator (together with the GlobalNumberState
utility) in to a separate file so that it can be used by other passes.
For example, the SwiftMergeFunctions pass in the Swift compiler:
https://github.com/apple/swift/blob/master/lib/LLVMPasses/LLVMMergeFunctions.cpp

Details of the change:

*) The big part is just moving code out of MergeFunctions.cpp into FunctionComparator.h/cpp
*) Make FunctionComparator member functions protected (instead of private)
   so that a derived comparator class can use them.

Following refactoring helps to share code between the base FunctionComparator
class and a derived class:

*) Add a beginCompare() function
*) Move some basic function property comparisons into a separate function compareSignature()
*) Do the GEP comparison inside cmpOperations() which now has a new
   needToCmpOperands reference parameter

https://reviews.llvm.org/D25385

llvm-svn: 286632
2016-11-11 21:15:13 +00:00
..
ASanStackFrameLayoutTest.cpp [asan] Simplify calculation of stack frame layout extraction calculation of stack description into separate function. 2016-10-18 23:29:52 +00:00
Cloning.cpp Cloning: Also clone global variable attached metadata. 2016-10-26 02:57:33 +00:00
CMakeLists.txt Make the FunctionComparator of the MergeFunctions pass a stand-alone utility. 2016-11-11 21:15:13 +00:00
FunctionComparator.cpp Make the FunctionComparator of the MergeFunctions pass a stand-alone utility. 2016-11-11 21:15:13 +00:00
IntegerDivision.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
Local.cpp Remove every uses of getGlobalContext() in LLVM (but the C API) 2016-04-14 21:59:01 +00:00
MemorySSA.cpp [MemorySSA] Tighten up types to make our API prettier. NFC. 2016-11-01 21:17:46 +00:00
ValueMapperTest.cpp ValueMapper: Stop memoizing ConstantAsMetadata 2016-04-16 03:39:44 +00:00