LLVM 22.0.0git
MemProfCommon.h
Go to the documentation of this file.
1//===- MemProfCommon.h - MemProf common utilities ---------------*- C++ -*-===//
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// This file contains MemProf common utilities.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_PROFILEDATA_MEMPROFCOMMON_H
14#define LLVM_PROFILEDATA_MEMPROFCOMMON_H
15
18
19namespace llvm {
20namespace memprof {
21
22struct Frame;
23
24/// Return the allocation type for a given set of memory profile values.
25LLVM_ABI AllocationType getAllocType(uint64_t TotalLifetimeAccessDensity,
26 uint64_t AllocCount,
27 uint64_t TotalLifetime);
28
29/// Helper to generate a single hash id for a given callstack, used for emitting
30/// matching statistics and useful for uniquing such statistics across modules.
31/// Also used to dedup contexts when computing the summary.
32LLVM_ABI uint64_t computeFullStackId(ArrayRef<Frame> CallStack);
33
34} // namespace memprof
35} // namespace llvm
36
37#endif // LLVM_PROFILEDATA_MEMPROFCOMMON_H
#define LLVM_ABI
Definition: Compiler.h:213
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
LLVM_ABI AllocationType getAllocType(uint64_t TotalLifetimeAccessDensity, uint64_t AllocCount, uint64_t TotalLifetime)
Return the allocation type for a given set of memory profile values.
LLVM_ABI uint64_t computeFullStackId(ArrayRef< Frame > CallStack)
Helper to generate a single hash id for a given callstack, used for emitting matching statistics and ...
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18