!60 [sync] PR-58: [MLIR17] Adaptation to llvm17/mlir17.
From: @openeuler-sync-bot Reviewed-by: @wumingchuan Signed-off-by: @wumingchuan
This commit is contained in:
commit
54ef742134
@ -0,0 +1,26 @@
|
|||||||
|
From 53b9b9ea326df8fec717260eda09e5d73d7a30cd Mon Sep 17 00:00:00 2001
|
||||||
|
From: qiujiacai <qiujiacai_yewu@cmss.chinamobile.com>
|
||||||
|
Date: Wed, 20 Sep 2023 18:28:49 +0800
|
||||||
|
Subject: [PATCH 4/7] [Pin-Server] Added null pointer check to avoid potential
|
||||||
|
null pointer problems
|
||||||
|
|
||||||
|
---
|
||||||
|
user/ArrayWidenPass.cpp | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/user/ArrayWidenPass.cpp b/user/ArrayWidenPass.cpp
|
||||||
|
index 475f784..cafb177 100644
|
||||||
|
--- a/user/ArrayWidenPass.cpp
|
||||||
|
+++ b/user/ArrayWidenPass.cpp
|
||||||
|
@@ -702,6 +702,8 @@ static bool checkBodyMemRef(Value memRef)
|
||||||
|
static bool checkBodyPointerPlus(Operation *op, Value &tmpIndex)
|
||||||
|
{
|
||||||
|
auto assignOp = dyn_cast<AssignOp>(op);
|
||||||
|
+ if(!assignOp)
|
||||||
|
+ return false;
|
||||||
|
Value rhs1 = assignOp.GetRHS1();
|
||||||
|
Value rhs2 = assignOp.GetRHS2();
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
From b239a7940f1439d425cb37729fe380db73734856 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?=E9=83=91=E6=99=A8=E5=8D=89?= <zhengchenhui1@huawei.com>
|
||||||
|
Date: Fri, 3 Nov 2023 11:39:12 +0800
|
||||||
|
Subject: [PATCH 5/7] [Pin-server] Bugfix for the operation sequence of
|
||||||
|
userOpts.
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/PluginServer/PluginServer.cpp | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/PluginServer/PluginServer.cpp b/lib/PluginServer/PluginServer.cpp
|
||||||
|
index 8778019..9a8d5e5 100644
|
||||||
|
--- a/lib/PluginServer/PluginServer.cpp
|
||||||
|
+++ b/lib/PluginServer/PluginServer.cpp
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
#include <thread>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
+#include <mutex>
|
||||||
|
|
||||||
|
#include "PluginAPI/PluginServerAPI.h"
|
||||||
|
#include "user/user.h"
|
||||||
|
@@ -34,6 +35,8 @@ using namespace PluginOpt;
|
||||||
|
using std::cout;
|
||||||
|
using std::endl;
|
||||||
|
using std::pair;
|
||||||
|
+
|
||||||
|
+static std::mutex register_mutex; // 线程锁
|
||||||
|
PluginServer *PluginServer::pluginServerPtr = nullptr;
|
||||||
|
PluginServer *PluginServer::GetInstance()
|
||||||
|
{
|
||||||
|
@@ -273,6 +276,7 @@ void PluginServer::ParseArgv(const string& data)
|
||||||
|
|
||||||
|
void PluginServer::SendRegisteredUserOpts()
|
||||||
|
{
|
||||||
|
+ register_mutex.lock();
|
||||||
|
for (auto it = userOpts.begin(); it != userOpts.end(); it++) {
|
||||||
|
string key = "injectPoint";
|
||||||
|
for (auto& userOpt : it->second) {
|
||||||
|
@@ -286,6 +290,7 @@ void PluginServer::SendRegisteredUserOpts()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pluginCom.ServerSend("injectPoint", "finished");
|
||||||
|
+ register_mutex.unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PluginServer::ServerSemPost(const string& port)
|
||||||
|
@@ -307,8 +312,9 @@ void PluginServer::RunServer()
|
||||||
|
}
|
||||||
|
log->LOGI("Server ppid:%d listening on port:%s\n", getppid(), port.c_str());
|
||||||
|
ServerSemPost(port);
|
||||||
|
-
|
||||||
|
+ register_mutex.lock();
|
||||||
|
RegisterCallbacks();
|
||||||
|
+ register_mutex.unlock();
|
||||||
|
log->LOGI("RunServer: RegisterCallbacks Done.\n");
|
||||||
|
pluginCom.Run();
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
1279
0033-Pin-server-Add-DataFlow-APIs.patch
Normal file
1279
0033-Pin-server-Add-DataFlow-APIs.patch
Normal file
File diff suppressed because it is too large
Load Diff
1599
0034-MLIR17-Adaptation-to-llvm17-mlir17.patch
Normal file
1599
0034-MLIR17-Adaptation-to-llvm17-mlir17.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
Name: pin-server
|
Name: pin-server
|
||||||
Version: 0.4.0
|
Version: 0.4.0
|
||||||
Release: 14
|
Release: 16
|
||||||
Summary: Pin (Plug-IN framework) server provides plugin APIs for compiler optimization developers to develop optimization pass.
|
Summary: Pin (Plug-IN framework) server provides plugin APIs for compiler optimization developers to develop optimization pass.
|
||||||
License: Apache 2.0
|
License: Apache 2.0
|
||||||
URL: https://gitee.com/openeuler/pin-server
|
URL: https://gitee.com/openeuler/pin-server
|
||||||
@ -40,6 +40,10 @@ Patch27: 0027-Pin-server-Optimized-LocalVarSummeryPass.patch
|
|||||||
Patch28: 0028-Pin-server-Adaptation-to-llvm15-mlir15-only-solves-t.patch
|
Patch28: 0028-Pin-server-Adaptation-to-llvm15-mlir15-only-solves-t.patch
|
||||||
Patch29: 0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch
|
Patch29: 0029-Pin-server-Adaptation-to-gcc12-only-solves-the-build.patch
|
||||||
Patch30: 0030-Pin-server-fix-the-adaptation-to-grpc-1.54.2.patch
|
Patch30: 0030-Pin-server-fix-the-adaptation-to-grpc-1.54.2.patch
|
||||||
|
Patch31: 0031-Pin-Server-Added-null-pointer-check-to-avoid-potenti.patch
|
||||||
|
Patch32: 0032-Pin-server-Bugfix-for-the-operation-sequence-of-user.patch
|
||||||
|
Patch33: 0033-Pin-server-Add-DataFlow-APIs.patch
|
||||||
|
Patch34: 0034-MLIR17-Adaptation-to-llvm17-mlir17.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Pin (Plug-IN framework) server provides plugin APIs for compiler optimization developers to develop optimization pass.
|
Pin (Plug-IN framework) server provides plugin APIs for compiler optimization developers to develop optimization pass.
|
||||||
@ -87,13 +91,25 @@ find %{_libdir} -type f -name "libMLIRServerAPI.so" -exec strip "{}" ";"
|
|||||||
%files demo
|
%files demo
|
||||||
%attr(0755,root,root) %{_libdir}/libpin_user.so
|
%attr(0755,root,root) %{_libdir}/libpin_user.so
|
||||||
%attr(0755,root,root) %{_libdir}/libMLIRPluginServer.so
|
%attr(0755,root,root) %{_libdir}/libMLIRPluginServer.so
|
||||||
%attr(0755,root,root) %{_libdir}/libMLIRPluginServer.so.15
|
%attr(0755,root,root) %{_libdir}/libMLIRPluginServer.so.17
|
||||||
%attr(0755,root,root) %{_libdir}/libMLIRServerAPI.so
|
%attr(0755,root,root) %{_libdir}/libMLIRServerAPI.so
|
||||||
%attr(0755,root,root) %{_libdir}/libMLIRServerAPI.so.15
|
%attr(0755,root,root) %{_libdir}/libMLIRServerAPI.so.17
|
||||||
%attr(0644,root,root) %{_libdir}/libpin_user.sha256
|
%attr(0644,root,root) %{_libdir}/libpin_user.sha256
|
||||||
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
%config(noreplace) /etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 09 2024 wumingchuan <wumingchuan1992@foxmail.com> - 0.4.0-16
|
||||||
|
- Type:FIX
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Adaptation to llvm17/mlir17
|
||||||
|
|
||||||
|
* Mon Apr 08 2024 wumingchuan <wumingchuan1992@foxmail.com> - 0.4.0-15
|
||||||
|
- Type:FIX
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:Sync patch from openEuler/pin-server
|
||||||
|
|
||||||
* Tue Aug 22 2023 liyunfei <liyunfei33@huawei.com> - 0.4.0-14
|
* Tue Aug 22 2023 liyunfei <liyunfei33@huawei.com> - 0.4.0-14
|
||||||
- Type:FIX
|
- Type:FIX
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user