//===- bolt/Passes/StokeInfo.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 // //===----------------------------------------------------------------------===// // // Pass to get information for functions for the Stoke Optimization // To use the Stoke optimization technique to optimize the HHVM. // This Pass solves the two major problems to use the Stoke program without // probing its code: // // 1. Stoke works on function level, but it is only limited to relative // small functions which are loop-free, call-free, exception-free, etc. // // 2. Stoke requires much information being manually provided, such as the // register usages and memory modification, etc. // // This Pass analyzes all functions and get the required information into // .csv file. Next, we use python scripts to process the file, filter // out functions for optimization and automatically generate configure files. // Finally, these configure files are feed to the Stoke to do the job. // //===----------------------------------------------------------------------===// #ifndef BOLT_PASSES_STOKEINFO_H #define BOLT_PASSES_STOKEINFO_H #include "bolt/Passes/BinaryPasses.h" #include <fstream> namespace llvm { namespace bolt { class DataflowInfoManager; class RegAnalysis; /// Structure to hold information needed by Stoke for a function struct StokeFuncInfo { … }; class StokeInfo : public BinaryFunctionPass { … }; } // namespace bolt } // namespace llvm #endif