14#ifndef LLVM_IR_STRUCTURALHASH_H
15#define LLVM_IR_STRUCTURALHASH_H
34 bool DetailedHash =
false);
This file implements a map that provides insertion order iteration.
This class implements a map that also provides access to all stored values in a deterministic order.
A Module instance is used to store all the information related to an LLVM module.
This is an optimization pass for GlobalISel generic memory operations.
std::function< bool(const Instruction *, unsigned)> IgnoreOperandFunc
A function that takes an instruction and an operand index and returns true if the operand should be i...
LLVM_ABI FunctionHashInfo StructuralHashWithDifferences(const Function &F, IgnoreOperandFunc IgnoreOp)
Computes a structural hash of a given function, considering the structure and content of the function...
uint64_t stable_hash
An opaque object representing a stable hash code.
MapVector< unsigned, Instruction * > IndexInstrMap
A map from an instruction index to an instruction pointer.
DenseMap< IndexPair, stable_hash > IndexOperandHashMapType
A map from an IndexPair to a stable hash.
std::pair< unsigned, unsigned > IndexPair
The pair of an instruction index and a operand index.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
LLVM_ABI stable_hash StructuralHash(const Function &F, bool DetailedHash=false)
Returns a hash of the function F.
Implement std::hash so that hash_code can be used in STL containers.
stable_hash FunctionHash
A hash value representing the structural content of the function.
std::unique_ptr< IndexInstrMap > IndexInstruction
A mapping from instruction indices to instruction pointers.
std::unique_ptr< IndexOperandHashMapType > IndexOperandHashMap
A mapping from pairs of instruction indices and operand indices to the hashes of the operands.
FunctionHashInfo(stable_hash FuntionHash, std::unique_ptr< IndexInstrMap > IndexInstruction, std::unique_ptr< IndexOperandHashMapType > IndexOperandHashMap)