30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
From 085d310af6b860b00245c0ceb88c9cc8413ae67e Mon Sep 17 00:00:00 2001
|
|
From: d00573793 <dingguangya1@huawei.com>
|
|
Date: Fri, 24 Mar 2023 18:41:45 +0800
|
|
Subject: [PATCH] [Pin-server] Optimized LocalVarSummeryPass
|
|
|
|
|
|
diff --git a/user/LocalVarSummeryPass.cpp b/user/LocalVarSummeryPass.cpp
|
|
index b7e104e..4f72a2a 100755
|
|
--- a/user/LocalVarSummeryPass.cpp
|
|
+++ b/user/LocalVarSummeryPass.cpp
|
|
@@ -35,6 +35,7 @@ static void LocalVarSummery(void)
|
|
vector<mlir::Plugin::FunctionOp> allFunction = pluginAPI.GetAllFunc();
|
|
map<string, string> args = PluginServer::GetInstance()->GetArgs();
|
|
for (size_t i = 0; i < allFunction.size(); i++) {
|
|
+ if (allFunction[i] == nullptr) continue;
|
|
uint64_t funcID = allFunction[i].idAttr().getValue().getZExtValue();
|
|
fprintf(stderr, "In the %ldth function:\n", i);
|
|
vector<mlir::Plugin::LocalDeclOp> decls = pluginAPI.GetDecls(funcID);
|
|
@@ -73,6 +74,7 @@ static void LocalVarSummery(void)
|
|
}
|
|
for (size_t j = 0; j < decls.size(); j++) {
|
|
auto decl = decls[j];
|
|
+ if (decl == nullptr) continue;
|
|
string name = decl.symNameAttr().getValue().str();
|
|
int64_t declTypeID = decl.typeIDAttr().getValue().getZExtValue();
|
|
if (declTypeID == typeFilter) {
|
|
--
|
|
2.33.0
|
|
|