diff options
| author | Erik Eckstein <eeckstein@apple.com> | 2016-11-11 21:15:13 +0000 |
|---|---|---|
| committer | Erik Eckstein <eeckstein@apple.com> | 2016-11-11 21:15:13 +0000 |
| commit | 4d6fb72aa93dee764f2dac5dcf324bf45f062e4b (patch) | |
| tree | 14288591bdfa8b1f33a73061f8f081ec70155bab /clang/lib/CodeGen/CodeGenFunction.cpp | |
| parent | 653e3f4e197d6d27710f09366bf9542ea617594f (diff) | |
| download | llvm-4d6fb72aa93dee764f2dac5dcf324bf45f062e4b.zip llvm-4d6fb72aa93dee764f2dac5dcf324bf45f062e4b.tar.gz llvm-4d6fb72aa93dee764f2dac5dcf324bf45f062e4b.tar.bz2 | |
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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
