//===-- StructuralHash.cpp - IR Hashing -------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #include "llvm/IR/StructuralHash.h" #include "llvm/ADT/Hashing.h" #include "llvm/IR/Function.h" #include "llvm/IR/GlobalVariable.h" #include "llvm/IR/InstrTypes.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Module.h" usingnamespacellvm; namespace { // Basic hashing mechanism to detect structural change to the IR, used to verify // pass return status consistency with actual change. In addition to being used // by the MergeFunctions pass. class StructuralHashImpl { … }; } // namespace IRHash llvm::StructuralHash(const Function &F, bool DetailedHash) { … } IRHash llvm::StructuralHash(const Module &M, bool DetailedHash) { … }