1 Star 1 Fork 0

Rong Tao/autofdo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
llvm_propeller_profile_writer.h 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef AUTOFDO_LLVM_PROPELLER_PROFILE_WRITER_H_
#define AUTOFDO_LLVM_PROPELLER_PROFILE_WRITER_H_
#if defined(HAVE_LLVM)
#include <memory>
#include "llvm_propeller_abstract_whole_program_info.h"
#include "llvm_propeller_code_layout.h"
#include "llvm_propeller_options.pb.h"
#include "llvm_propeller_statistics.h"
#include "third_party/abseil/absl/status/status.h"
namespace devtools_crosstool_autofdo {
// Propeller interface for SWIG as well as create_llvm_prof.
absl::Status GeneratePropellerProfiles(
const devtools_crosstool_autofdo::PropellerOptions &opts);
class PropellerProfWriter {
public:
static std::unique_ptr<PropellerProfWriter> Create(
const PropellerOptions &options);
// Main entrance of propeller profile writer.
// Return true if succeeded.
bool Write(const CodeLayoutResult &layout_cluster_info);
const PropellerStats &stats() const { return stats_; }
void PrintStats() const;
const AbstractPropellerWholeProgramInfo *whole_program_info() const {
return whole_program_info_.get();
}
~PropellerProfWriter() {}
private:
PropellerProfWriter(const PropellerOptions &options,
std::unique_ptr<AbstractPropellerWholeProgramInfo> wpi)
: options_(options), whole_program_info_(std::move(wpi)) {}
const PropellerOptions options_;
PropellerStats stats_;
std::unique_ptr<AbstractPropellerWholeProgramInfo> whole_program_info_;
};
} // namespace devtools_crosstool_autofdo
#endif
#endif // AUTOFDO_LLVM_PROPELLER_PROFILE_WRITER_H_
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/rtoax/autofdo.git
git@gitee.com:rtoax/autofdo.git
rtoax
autofdo
autofdo
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385