15 #ifndef LLVM_TRANSFORMS_UTILS_FUNCTIONCOMPARATOR_H 16 #define LLVM_TRANSFORMS_UTILS_FUNCTIONCOMPARATOR_H 57 enum { FollowRAUW =
false };
67 uint64_t NextNumber = 0;
75 std::tie(MapIter, Inserted) = GlobalNumbers.
insert({Global, NextNumber});
82 GlobalNumbers.
erase(Global);
86 GlobalNumbers.
clear();
98 : FnL(F1), FnR(F2), GlobalNumbers(GN) {}
116 int compareSignature()
const;
247 int cmpValues(
const Value *L,
const Value *R)
const;
279 bool &needToCmpOperands)
const;
321 int cmpTypes(
Type *TyL,
Type *TyR)
const;
323 int cmpNumbers(uint64_t L, uint64_t R)
const;
324 int cmpAPInts(
const APInt &L,
const APInt &R)
const;
335 int cmpRangeMetadata(
const MDNode *L,
const MDNode *R)
const;
349 return cmpGEPs(cast<GEPOperator>(GEPL), cast<GEPOperator>(GEPR));
393 #endif // LLVM_TRANSFORMS_UTILS_FUNCTIONCOMPARATOR_H
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
Atomic ordering constants.
This class represents lattice values for constants.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
This class defines the default behavior for configurable aspects of ValueMap<>.
uint64_t FunctionHash
Hash a function.
FunctionComparator(const Function *F1, const Function *F2, GlobalNumberState *GN)
This file contains the simple types necessary to represent the attributes associated with functions a...
AtomicOrdering
Atomic ordering for LLVM's memory model.
void beginCompare()
Start the comparison.
uint64_t getNumber(GlobalValue *Global)
void erase(GlobalValue *Global)
an instruction for type-safe pointer arithmetic to access elements of arrays and structs ...
FunctionComparator - Compares two functions to determine whether or not they will generate machine co...
LLVM Basic Block Representation.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
GlobalNumberState assigns an integer to each global value in the program, which is used by the compar...
Class for arbitrary precision integers.
int compare(DigitsT LDigits, int16_t LScale, DigitsT RDigits, int16_t RScale)
Compare two scaled numbers.
LLVM Value Representation.
StringRef - Represent a constant reference to a string, i.e.
GlobalNumberState()=default
bool erase(const KeyT &Val)