Projects
Eulaceura:Factory
pin-server
_service:obs_scm:0007-Pin-server-Refactoring-ar...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0007-Pin-server-Refactoring-array-widen-compare-into-a-cl.patch of Package pin-server
From 1f800efcb93e2868f609c70584966b706ba13031 Mon Sep 17 00:00:00 2001 From: Mingchuan Wu <wumingchuan1992@foxmail.com> Date: Tue, 21 Feb 2023 17:37:23 +0800 Subject: [PATCH 07/23] [Pin-server] Refactoring array-widen-compare into a class. diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a784df..4b2ab67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,7 @@ target_link_libraries(plg_grpc_proto add_subdirectory(include) add_subdirectory(lib) -add_library(pin_user SHARED "user.cpp") +add_library(pin_user SHARED "user/ArrayWidenPass.cpp") target_link_libraries(pin_user MLIRServerAPI ) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7b0c8c4..6bc2859 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -5,9 +5,9 @@ add_mlir_library(MLIRServerAPI DEPENDS MLIRPluginOpsIncGen - MLIRPlugin + MLIRPluginServer LINK_LIBS PUBLIC MLIRIR - MLIRPlugin + MLIRPluginServer ) \ No newline at end of file diff --git a/lib/Dialect/CMakeLists.txt b/lib/Dialect/CMakeLists.txt index ca912e9..8627cdd 100644 --- a/lib/Dialect/CMakeLists.txt +++ b/lib/Dialect/CMakeLists.txt @@ -1,4 +1,4 @@ -add_mlir_dialect_library(MLIRPlugin +add_mlir_dialect_library(MLIRPluginServer PluginTypes.cpp PluginDialect.cpp PluginOps.cpp diff --git a/user.cpp b/user/ArrayWidenPass.cpp similarity index 100% rename from user.cpp rename to user/ArrayWidenPass.cpp diff --git a/user/user.cpp b/user/user.cpp new file mode 100644 index 0000000..bee70bb --- /dev/null +++ b/user/user.cpp @@ -0,0 +1,33 @@ +/* Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may obtain + a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + License for the specific language governing permissions and limitations + under the License. + + Author: Mingchuan Wu and Yancheng Li + Create: 2022-08-18 + Description: + This file contains the implementation of the User Init. +*/ + +#include "PluginAPI/PluginServerAPI.h" +#include "user/ArrayWidenPass.h" +#include "user/InlineFunctionPass.h" +#include "user/LocalVarSummeryPass.h" + +void RegisterCallbacks(void) +{ + PinServer::PluginServer *pluginServer = PinServer::PluginServer::GetInstance(); + pluginServer->RegisterOpt(std::make_shared<PluginOpt::InlineFunctionPass>(PluginOpt::HANDLE_BEFORE_IPA)); + pluginServer->RegisterOpt(std::make_shared<PluginOpt::LocalVarSummeryPass>(PluginOpt::HANDLE_AFTER_IPA)); + PluginOpt::ManagerSetup setupData(PluginOpt::PASS_PHIOPT, 1, PluginOpt::PASS_INSERT_AFTER); + pluginServer->RegisterPassManagerOpt(setupData, std::make_shared<PluginOpt::ArrayWidenPass>()); +} -- 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