//===- bolt/Passes/ShrinkWrapping.h -----------------------------*- 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 BOLT_PASSES_SHRINKWRAPPING_H #define BOLT_PASSES_SHRINKWRAPPING_H #include "bolt/Passes/FrameAnalysis.h" #include "llvm/MC/MCRegisterInfo.h" #include <atomic> namespace llvm { namespace bolt { class DataflowInfoManager; /// Encapsulates logic required to analyze a binary function and detect which /// registers are being saved as callee-saved, where are these saves and where /// are the points where their original value are being restored. class CalleeSavedAnalysis { … }; /// Identifies in a given binary function all stack regions being used and allow /// us to edit the layout, removing or inserting new regions. When the layout is /// modified, all affected stack-accessing instructions are updated. class StackLayoutModifier { … }; /// Implements a pass to optimize callee-saved register spills. These spills /// typically happen at function prologue/epilogue. When these are hot basic /// blocks, this pass will try to move these spills to cold blocks whenever /// possible. class ShrinkWrapping { … }; } // end namespace bolt } // end namespace llvm #endif