Projects
Eulaceura:Mainline
pin-server
_service:obs_scm:0005-Pin-server-Add-API-for-LT...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0005-Pin-server-Add-API-for-LTO-judgement.patch of Package pin-server
From 47f1208aab2acb3e1a8442d830125ad3b54149c5 Mon Sep 17 00:00:00 2001 From: benniaobufeijiushiji <linda7@huawei.com> Date: Sun, 19 Feb 2023 14:40:09 +0800 Subject: [PATCH 05/23] [Pin-server] Add API for LTO judgement diff --git a/include/PluginAPI/BasicPluginOpsAPI.h b/include/PluginAPI/BasicPluginOpsAPI.h index 0ca0ac4..f83b888 100644 --- a/include/PluginAPI/BasicPluginOpsAPI.h +++ b/include/PluginAPI/BasicPluginOpsAPI.h @@ -70,6 +70,8 @@ public: virtual uint32_t AddArgInPhiOp(uint64_t, uint64_t, uint64_t, uint64_t) = 0; virtual PhiOp CreatePhiOp(uint64_t, uint64_t) = 0; virtual void DebugValue(uint64_t) = 0; + virtual bool IsLtoOptimize() = 0; + virtual bool IsWholeProgram() = 0; virtual mlir::Value GetCurrentDefFromSSA(uint64_t) = 0; virtual bool SetCurrentDefInSSA(uint64_t, uint64_t) = 0; diff --git a/include/PluginAPI/PluginServerAPI.h b/include/PluginAPI/PluginServerAPI.h index 0655d80..b2f8fbf 100644 --- a/include/PluginAPI/PluginServerAPI.h +++ b/include/PluginAPI/PluginServerAPI.h @@ -74,6 +74,8 @@ public: /* Plugin API for ConstOp. */ mlir::Value CreateConstOp(mlir::Attribute, mlir::Type) override; void DebugValue(uint64_t) override; + bool IsLtoOptimize() override; + bool IsWholeProgram() override; mlir::Value GetCurrentDefFromSSA(uint64_t) override; bool SetCurrentDefInSSA(uint64_t, uint64_t) override; diff --git a/lib/PluginAPI/PluginServerAPI.cpp b/lib/PluginAPI/PluginServerAPI.cpp index 523e08d..f81a3ad 100644 --- a/lib/PluginAPI/PluginServerAPI.cpp +++ b/lib/PluginAPI/PluginServerAPI.cpp @@ -587,4 +587,20 @@ void PluginServerAPI::DebugValue(uint64_t valId) PluginServer::GetInstance()->RemoteCallClientWithAPI(funName, params); } +bool PluginServerAPI::IsLtoOptimize() +{ + Json::Value root; + string funName = __func__; + string params = root.toStyledString(); + return PluginServer::GetInstance()->GetBoolResult(funName, params); +} + +bool PluginServerAPI::IsWholeProgram() +{ + Json::Value root; + string funName = __func__; + string params = root.toStyledString(); + return PluginServer::GetInstance()->GetBoolResult(funName, params); +} + } // namespace Plugin_IR -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2