LLVM  10.0.0svn
SizeOpts.h
Go to the documentation of this file.
1 //===- llvm/Transforms/Utils/SizeOpts.h - 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 code size optimization related code.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
14 #define LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
15 
16 namespace llvm {
17 
18 class BasicBlock;
19 class BlockFrequencyInfo;
20 class Function;
21 class ProfileSummaryInfo;
22 
23 /// Returns true if function \p F is suggested to be size-optimized base on the
24 /// profile.
25 bool shouldOptimizeForSize(Function *F, ProfileSummaryInfo *PSI,
26  BlockFrequencyInfo *BFI);
27 /// Returns true if basic block \p BB is suggested to be size-optimized base
28 /// on the profile.
29 bool shouldOptimizeForSize(BasicBlock *BB, ProfileSummaryInfo *PSI,
30  BlockFrequencyInfo *BFI);
31 
32 } // end namespace llvm
33 
34 #endif // LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
Various leaf nodes.
Definition: ISDOpcodes.h:59
F(f)
bool shouldOptimizeForSize(Function *F, ProfileSummaryInfo *PSI, BlockFrequencyInfo *BFI)
Returns true if function F is suggested to be size-optimized base on the profile. ...
Definition: SizeOpts.cpp:23