8000 [circt-lec] Move `circt-lec` files to CIRCT library by TaoBi22 · Pull Request #4544 · llvm/circt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[circt-lec] Move circt-lec files to CIRCT library #4544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails 8000 .

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmake/modules/AddCIRCT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,8 @@ function(add_circt_translation_library name)
set_property(GLOBAL APPEND PROPERTY CIRCT_TRANSLATION_LIBS ${name})
add_circt_library(${ARGV} DEPENDS circt-headers)
endfunction()

function(add_circt_verification_library name)
set_property(GLOBAL APPEND PROPERTY CIRCT_VERIFICATION_LIBS ${name})
add_circt_library(${ARGV} DEPENDS circt-headers)
endfunction()
1 change: 1 addition & 0 deletions cmake/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ get_property(CIRCT_DIALECT_LIBS GLOBAL PROPERTY CIRCT_DIALECT_LIBS)
get_property(CIRCT_CONVERSION_LIBS GLOBAL PROPERTY CIRCT_CONVERSION_LIBS)
get_property(CIRCT_TRANSLATION_LIBS GLOBAL PROPERTY CIRCT_TRANSLATION_LIBS)
get_property(CIRCT_ANALYSIS_LIBS GLOBAL PROPERTY CIRCT_ANALYSIS_LIBS)
get_property(CIRCT_VERIFICATION_LIBS GLOBAL PROPERTY CIRCT_VERIFICATION_LIBS)

# Generate CIRCTConfig.cmake for the build tree.
set(CIRCT_CONFIG_CMAKE_DIR "${circt_cmake_builddir}")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ add_subdirectory(Bindings)
add_subdirectory(CAPI)
add_subdirectory(Conversion)
add_subdirectory(Dialect)
add_subdirectory(LogicalEquivalence)
add_subdirectory(Firtool)
add_subdirectory(Reduce)
add_subdirectory(Scheduling)
Expand Down
25 changes: 25 additions & 0 deletions lib/LogicalEquivalence/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
if(CIRCT_LEC_ENABLED)
add_circt_verification_library(CIRCTLogicalEquivalence
Solver.cpp
Circuit.cpp
LogicExporter.cpp

LINK_COMPONENTS
Core

LINK_LIBS
${Z3_LIBRARIES}

LINK_LIBS PUBLIC
MLIRTransforms
MLIRTranslateLib
CIRCTComb
CIRCTHW
CIRCTSupport
)
target_include_directories(CIRCTLogicalEquivalence
PRIVATE
${Z3_INCLUDE_DIR}
${Z3_CXX_INCLUDE_DIRS}
)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
///
//===----------------------------------------------------------------------===//

#include "Circuit.h"
#include "LogicExporter.h"
#include "Solver.h"
#include "Utility.h"
#include "circt/LogicalEquivalence/Circuit.h"
#include "circt/LogicalEquivalence/LogicExporter.h"
#include "circt/LogicalEquivalence/Solver.h"
#include "circt/LogicalEquivalence/Utility.h"
#include "mlir/IR/Builders.h"

#define DEBUG_TYPE "lec-circuit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
///
//===----------------------------------------------------------------------===//

#include "LogicExporter.h 6D4E "
#include "Circuit.h"
#include "Solver.h"
#include "Utility.h"
#include "circt/LogicalEquivalence/LogicExporter.h"
#include "circt/LogicalEquivalence/Circuit.h"
#include "circt/LogicalEquivalence/Solver.h"
#include "circt/LogicalEquivalence/Utility.h"
#include "llvm/ADT/TypeSwitch.h"

#define DEBUG_TYPE "lec-exporter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
///
//===----------------------------------------------------------------------===//

#include "Solver.h"
#include "Circuit.h"
#include "LogicExporter.h"
#include "Utility.h"
#include "circt/LogicalEquivalence/Solver.h"
#include "circt/LogicalEquivalence/Circuit.h"
#include "circt/LogicalEquivalence/LogicExporter.h"
#include "circt/LogicalEquivalence/Utility.h"
#include "mlir/IR/Builders.h"
#include <string>
#include <z3++.h>
Expand Down
15 changes: 1 addition & 14 deletions tools/circt-lec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,14 @@
if(CIRCT_LEC_ENABLED)
add_llvm_tool(circt-lec
circt-lec.cpp
Circuit.cpp
LogicExporter.cpp
Solver.cpp
)

target_link_libraries(circt-lec
PRIVATE
MLIRTransforms
MLIRTranslateLib
CIRCTComb
CIRCTHW
CIRCTSupport
CIRCTLogicalEquivalence
${Z3_LIBRARIES}
)

target_include_directories(circt-lec SYSTEM
PRIVATE
${Z3_INCLUDE_DIR}
${Z3_CXX_INCLUDE_DIRS}
)

# Correct the runpath when linking shared libraries.
if(BUILD_SHARED_LIBS)
set_target_properties(circt-lec PROPERTIES
Expand Down
6 changes: 3 additions & 3 deletions tools/circt-lec/circt-lec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
///
//===----------------------------------------------------------------------===//

#include "LogicExporter.h"
#include "Solver.h"
#include "Utility.h"
#include "circt/InitAllDialects.h"
#include "circt/LogicalEquivalence/LogicExporter.h"
#include "circt/LogicalEquivalence/Solver.h"
#include "circt/LogicalEquivalence/Utility.h"
#include "circt/Support/Version.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/OwningOpRef.h"
Expand Down
0