1 //===- llvm/Transforms/Utils/SizeOpts.h - size optimization -----*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file contains some shared code size optimization related code.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
14 #define LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
19 class BlockFrequencyInfo
;
21 class ProfileSummaryInfo
;
23 /// Returns true if function \p F is suggested to be size-optimized base on the
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
29 bool shouldOptimizeForSize(BasicBlock
*BB
, ProfileSummaryInfo
*PSI
,
30 BlockFrequencyInfo
*BFI
);
32 } // end namespace llvm
34 #endif // LLVM_TRANSFORMS_UTILS_SIZEOPTS_H