10#ifdef EXPENSIVE_CHECKS
25 uint64_t Hash = 0x6acaa36bef8325c5ULL;
27 void update(
uint64_t V) { Hash = hashing::detail::hash_16_bytes(Hash, V); }
30 StructuralHash() =
default;
44 while (!BBs.
empty()) {
47 for (
auto &Inst : *BB)
48 update(Inst.getOpcode());
51 for (
unsigned i = 0, e =
Term->getNumSuccessors(); i != e; ++i) {
52 if (!VisitedBBs.
insert(
Term->getSuccessor(i)).second)
59 void update(
const Module &M) {
64 uint64_t getHash()
const {
return Hash; }
70 ::details::StructuralHash
H;
76 ::details::StructuralHash
H;
Module.h This file contains the declarations for the Module class.
LLVM Basic Block Representation.
A Module instance is used to store all the information related to an LLVM module.
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.