1//===------------ MachineStableHash.h - MIR Stable Hashing Utilities ------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Stable hashing for MachineInstr and MachineOperand. Useful or getting a
10// hash across runs, modules, etc.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CODEGEN_MACHINESTABLEHASH_H
15#define LLVM_CODEGEN_MACHINESTABLEHASH_H
16
17#include "llvm/ADT/StableHashing.h"
18
19namespace llvm {
20class MachineBasicBlock;
21class MachineFunction;
22class MachineInstr;
23class MachineOperand;
24
25stable_hash stableHashValue(const MachineOperand &MO);
26stable_hash stableHashValue(const MachineInstr &MI, bool HashVRegs = false,
27 bool HashConstantPoolIndices = false,
28 bool HashMemOperands = false);
29stable_hash stableHashValue(const MachineBasicBlock &MBB);
30stable_hash stableHashValue(const MachineFunction &MF);
31
32} // namespace llvm
33
34#endif
35

source code of llvm/include/llvm/CodeGen/MachineStableHash.h