[InstCombine] Signed saturation patterns
[llvm-core.git] / include / llvm / Transforms / Utils / SizeOpts.h
blob1a052c694e6d6b5e7b58862cf53464669930f1a4
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.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
14 #define LLVM_TRANSFORMS_UTILS_SIZEOPTS_H
16 namespace llvm {
18 class BasicBlock;
19 class BlockFrequencyInfo;
20 class Function;
21 class ProfileSummaryInfo;
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);
32 } // end namespace llvm
34 #endif // LLVM_TRANSFORMS_UTILS_SIZEOPTS_H