LLVM 22.0.0git
MachineStableHash.h
Go to the documentation of this file.
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
19
20namespace llvm {
21class MachineBasicBlock;
22class MachineFunction;
23class MachineInstr;
24class MachineOperand;
25
26LLVM_ABI stable_hash stableHashValue(const MachineOperand &MO);
27LLVM_ABI stable_hash stableHashValue(const MachineInstr &MI,
28 bool HashVRegs = false,
29 bool HashConstantPoolIndices = false,
30 bool HashMemOperands = false);
31LLVM_ABI stable_hash stableHashValue(const MachineBasicBlock &MBB);
32LLVM_ABI stable_hash stableHashValue(const MachineFunction &MF);
33
34} // namespace llvm
35
36#endif
MachineBasicBlock & MBB
#define LLVM_ABI
Definition: Compiler.h:213
IRTranslator LLVM IR MI
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
LLVM_ABI stable_hash stableHashValue(const MachineOperand &MO)
uint64_t stable_hash
An opaque object representing a stable hash code.
Definition: StableHashing.h:28