代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/pin-server 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。