LLVM 22.0.0git
MachineSizeOpts.h
Go to the documentation of this file.
1//===- MachineSizeOpts.h - machine size optimization ------------*- 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 some shared machine IR code size optimization related
10// code.
11//
12//===----------------------------------------------------------------------===//
13#ifndef LLVM_CODEGEN_MACHINESIZEOPTS_H
14#define LLVM_CODEGEN_MACHINESIZEOPTS_H
15
18
19namespace llvm {
20
24class MachineFunction;
25class MBFIWrapper;
26
27/// Returns true if machine function \p MF is suggested to be size-optimized
28/// based on the profile.
29LLVM_ABI bool
33/// Returns true if machine basic block \p MBB is suggested to be size-optimized
34/// based on the profile.
35LLVM_ABI bool
37 const MachineBlockFrequencyInfo *MBFI,
39/// Returns true if machine basic block \p MBB is suggested to be size-optimized
40/// based on the profile.
41LLVM_ABI bool
45
46} // end namespace llvm
47
48#endif // LLVM_CODEGEN_MACHINESIZEOPTS_H
MachineBasicBlock & MBB
#define LLVM_ABI
Definition Compiler.h:213
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
Analysis providing profile information.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI, const MachineBlockFrequencyInfo *BFI, PGSOQueryType QueryType=PGSOQueryType::Other)
Returns true if machine function MF is suggested to be size-optimized based on the profile.
PGSOQueryType
Definition SizeOpts.h:35