blob: 8423b2da1c785e40ecca589d9b181d347ee9a7cc [file] [log] [blame]
Olivier Deprezf4ef2d02021-04-20 13:36:24 +02001//===------------ 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/CodeGen/StableHashing.h"
18
19namespace llvm {
20class MachineInstr;
21class MachineOperand;
22
23stable_hash stableHashValue(const MachineOperand &MO);
24stable_hash stableHashValue(const MachineInstr &MI, bool HashVRegs = false,
25 bool HashConstantPoolIndices = false,
26 bool HashMemOperands = false);
27
28} // namespace llvm
29
30#endif