//===-- CSPreInliner.h - Profile guided preinliner ---------------- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef LLVM_TOOLS_LLVM_PROFGEN_PGOINLINEADVISOR_H #define LLVM_TOOLS_LLVM_PROFGEN_PGOINLINEADVISOR_H #include "ProfiledBinary.h" #include "llvm/ADT/PriorityQueue.h" #include "llvm/ProfileData/ProfileCommon.h" #include "llvm/ProfileData/SampleProf.h" #include "llvm/Transforms/IPO/ProfiledCallGraph.h" #include "llvm/Transforms/IPO/SampleContextTracker.h" usingnamespacellvm; usingnamespacesampleprof; namespace llvm { namespace sampleprof { // Inline candidate seen from profile struct ProfiledInlineCandidate { … }; // Inline candidate comparer using call site weight struct ProfiledCandidateComparer { … }; ProfiledCandidateQueue; // Pre-compilation inliner based on context-sensitive profile. // The PreInliner estimates inline decision using hotness from profile // and cost estimation from machine code size. It helps merges context // profile globally and achieves better post-inine profile quality, which // otherwise won't be possible for ThinLTO. It also reduce context profile // size by only keep context that is estimated to be inlined. class CSPreInliner { … }; } // end namespace sampleprof } // end namespace llvm #endif