Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:32

0001 //===- MachineSizeOpts.h - machine size optimization ------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file contains some shared machine IR code size optimization related
0010 // code.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 #ifndef LLVM_CODEGEN_MACHINESIZEOPTS_H
0014 #define LLVM_CODEGEN_MACHINESIZEOPTS_H
0015 
0016 #include "llvm/Transforms/Utils/SizeOpts.h"
0017 
0018 namespace llvm {
0019 
0020 class ProfileSummaryInfo;
0021 class MachineBasicBlock;
0022 class MachineBlockFrequencyInfo;
0023 class MachineFunction;
0024 class MBFIWrapper;
0025 
0026 /// Returns true if machine function \p MF is suggested to be size-optimized
0027 /// based on the profile.
0028 bool shouldOptimizeForSize(const MachineFunction *MF, ProfileSummaryInfo *PSI,
0029                            const MachineBlockFrequencyInfo *BFI,
0030                            PGSOQueryType QueryType = PGSOQueryType::Other);
0031 /// Returns true if machine basic block \p MBB is suggested to be size-optimized
0032 /// based on the profile.
0033 bool shouldOptimizeForSize(const MachineBasicBlock *MBB,
0034                            ProfileSummaryInfo *PSI,
0035                            const MachineBlockFrequencyInfo *MBFI,
0036                            PGSOQueryType QueryType = PGSOQueryType::Other);
0037 /// Returns true if machine basic block \p MBB is suggested to be size-optimized
0038 /// based on the profile.
0039 bool shouldOptimizeForSize(const MachineBasicBlock *MBB,
0040                            ProfileSummaryInfo *PSI,
0041                            MBFIWrapper *MBFIWrapper,
0042                            PGSOQueryType QueryType = PGSOQueryType::Other);
0043 
0044 } // end namespace llvm
0045 
0046 #endif // LLVM_CODEGEN_MACHINESIZEOPTS_H