mirror of https://github.com/llvm/circt.git
Move the remaining references of SPT to CIRT. NFC.
This commit is contained in:
parent
1ec1e98165
commit
c216617817
|
@ -8,7 +8,7 @@
|
|||
"${workspaceFolder}/../llvm-project/llvm/include",
|
||||
"${workspaceFolder}/../llvm-project/build/include",
|
||||
"${workspaceFolder}/../llvm-project/build/tools/mlir/include",
|
||||
"${workspaceFolder}/../llvm-project/build/tools/spt/include"
|
||||
"${workspaceFolder}/../llvm-project/build/tools/cirt/include"
|
||||
],
|
||||
"defines": [],
|
||||
"macFrameworkPath": [
|
||||
|
@ -21,4 +21,4 @@
|
|||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# SPT project.
|
||||
# CIRT project.
|
||||
set(CIRT_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include ) # --src-root
|
||||
set(CIRT_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include ) # --includedir
|
||||
|
||||
|
@ -18,9 +18,9 @@ set(MLIR_BINARY_INCLUDE_DIR ${LLVM_TOOLS_BINARY_DIR}/../tools/mlir/include )
|
|||
|
||||
# Installing the headers and docs needs to depend on generating any public
|
||||
# tablegen'd targets.
|
||||
add_custom_target(spt-headers)
|
||||
set_target_properties(spt-headers PROPERTIES FOLDER "Misc")
|
||||
add_custom_target(spt-doc)
|
||||
add_custom_target(cirt-headers)
|
||||
set_target_properties(cirt-headers PROPERTIES FOLDER "Misc")
|
||||
add_custom_target(cirt-doc)
|
||||
|
||||
include_directories( ${MLIR_INCLUDE_DIR})
|
||||
include_directories( ${MLIR_BINARY_INCLUDE_DIR})
|
||||
|
@ -33,15 +33,15 @@ add_subdirectory(tools)
|
|||
#add_subdirectory(unittests)
|
||||
add_subdirectory(test)
|
||||
|
||||
#option(CIRT_INCLUDE_DOCS "Generate build targets for the SPT docs."
|
||||
#option(CIRT_INCLUDE_DOCS "Generate build targets for the CIRT docs."
|
||||
# ${LLVM_INCLUDE_DOCS} ${MLIR_INCLUDE_DOCS})
|
||||
#if (CIRT_INCLUDE_DOCS)
|
||||
# add_subdirectory(docs)
|
||||
#endif()
|
||||
|
||||
install(DIRECTORY include/spt
|
||||
install(DIRECTORY include/cirt
|
||||
DESTINATION include
|
||||
COMPONENT spt-headers
|
||||
COMPONENT cirt-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
PATTERN "*.h"
|
||||
|
@ -50,9 +50,9 @@ install(DIRECTORY include/spt
|
|||
PATTERN "LICENSE.TXT"
|
||||
)
|
||||
|
||||
install(DIRECTORY ${CIRT_INCLUDE_DIR}/spt
|
||||
install(DIRECTORY ${CIRT_INCLUDE_DIR}/cirt
|
||||
DESTINATION include
|
||||
COMPONENT spt-headers
|
||||
COMPONENT cirt-headers
|
||||
FILES_MATCHING
|
||||
PATTERN "*.def"
|
||||
PATTERN "*.h"
|
||||
|
@ -64,9 +64,9 @@ install(DIRECTORY ${CIRT_INCLUDE_DIR}/spt
|
|||
)
|
||||
|
||||
if (NOT LLVM_ENABLE_IDE)
|
||||
add_llvm_install_targets(install-spt-headers
|
||||
DEPENDS spt-headers
|
||||
COMPONENT spt-headers)
|
||||
add_llvm_install_targets(install-cirt-headers
|
||||
DEPENDS cirt-headers
|
||||
COMPONENT cirt-headers)
|
||||
endif()
|
||||
|
||||
add_subdirectory(cmake/modules)
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
# link against them. LLVM calls its version of this file LLVMExports.cmake, but
|
||||
# the usual CMake convention seems to be ${Project}Targets.cmake.
|
||||
set(CIRT_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
|
||||
set(spt_cmake_builddir "${CMAKE_BINARY_DIR}/${CIRT_INSTALL_PACKAGE_DIR}")
|
||||
set(cirt_cmake_builddir "${CMAKE_BINARY_DIR}/${CIRT_INSTALL_PACKAGE_DIR}")
|
||||
|
||||
# Keep this in sync with llvm/cmake/CMakeLists.txt!
|
||||
set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
|
||||
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
|
||||
get_property(CIRT_EXPORTS GLOBAL PROPERTY CIRT_EXPORTS)
|
||||
export(TARGETS ${CIRT_EXPORTS} FILE ${spt_cmake_builddir}/SptTargets.cmake)
|
||||
export(TARGETS ${CIRT_EXPORTS} FILE ${cirt_cmake_builddir}/CIRTTargets.cmake)
|
||||
|
||||
# Generate SptConfig.cmake for the build tree.
|
||||
set(CIRT_CONFIG_CMAKE_DIR "${spt_cmake_builddir}")
|
||||
# Generate CIRTConfig.cmake for the build tree.
|
||||
set(CIRT_CONFIG_CMAKE_DIR "${cirt_cmake_builddir}")
|
||||
set(CIRT_CONFIG_LLVM_CMAKE_DIR "${llvm_cmake_builddir}")
|
||||
set(CIRT_CONFIG_EXPORTS_FILE "${spt_cmake_builddir}/SptTargets.cmake")
|
||||
set(CIRT_CONFIG_EXPORTS_FILE "${cirt_cmake_builddir}/CIRTTargets.cmake")
|
||||
set(CIRT_CONFIG_INCLUDE_DIRS
|
||||
"${CIRT_SOURCE_DIR}/include"
|
||||
"${CIRT_BINARY_DIR}/include"
|
||||
|
@ -23,7 +23,7 @@ set(CIRT_CONFIG_CMAKE_DIR)
|
|||
set(CIRT_CONFIG_LLVM_CMAKE_DIR)
|
||||
set(CIRT_CONFIG_EXPORTS_FILE)
|
||||
|
||||
# Generate SptConfig.cmake for the install tree.
|
||||
# Generate CIRTConfig.cmake for the install tree.
|
||||
set(CIRT_CONFIG_CODE "
|
||||
# Compute the installation prefix from this LLVMConfig.cmake file location.
|
||||
get_filename_component(CIRT_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
|
||||
|
@ -36,7 +36,7 @@ get_filename_component(CIRT_INSTALL_PREFIX \"\${CIRT_INSTALL_PREFIX}\" PATH)")
|
|||
endforeach(p)
|
||||
set(CIRT_CONFIG_CMAKE_DIR "\${CIRT_INSTALL_PREFIX}/${CIRT_INSTALL_PACKAGE_DIR}")
|
||||
set(CIRT_CONFIG_LLVM_CMAKE_DIR "\${CIRT_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
set(CIRT_CONFIG_EXPORTS_FILE "\${CIRT_CMAKE_DIR}/SptTargets.cmake")
|
||||
set(CIRT_CONFIG_EXPORTS_FILE "\${CIRT_CMAKE_DIR}/CIRTTargets.cmake")
|
||||
set(CIRT_CONFIG_INCLUDE_DIRS
|
||||
"\${CIRT_INSTALL_PREFIX}/include"
|
||||
)
|
||||
|
@ -45,23 +45,23 @@ set(CIRT_CONFIG_CMAKE_DIR)
|
|||
set(CIRT_CONFIG_EXPORTS_FILE)
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
# Not TOOLCHAIN ONLY, so install the SPT parts as well
|
||||
# Include the cmake files so other tools can use spt-tblgen, etc.
|
||||
get_property(spt_has_exports GLOBAL PROPERTY CIRT_HAS_EXPORTS)
|
||||
if(spt_has_exports)
|
||||
install(EXPORT SptTargets DESTINATION ${CIRT_INSTALL_PACKAGE_DIR}
|
||||
COMPONENT spt-cmake-exports)
|
||||
# Not TOOLCHAIN ONLY, so install the CIRT parts as well
|
||||
# Include the cmake files so other tools can use cirt-tblgen, etc.
|
||||
get_property(cirt_has_exports GLOBAL PROPERTY CIRT_HAS_EXPORTS)
|
||||
if(cirt_has_exports)
|
||||
install(EXPORT CIRTTargets DESTINATION ${CIRT_INSTALL_PACKAGE_DIR}
|
||||
COMPONENT cirt-cmake-exports)
|
||||
endif()
|
||||
|
||||
install(FILES #${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/SptConfig.cmake
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/AddSPT.cmake
|
||||
install(FILES #${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CIRTConfig.cmake
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/AddCIRT.cmake
|
||||
DESTINATION ${CIRT_INSTALL_PACKAGE_DIR}
|
||||
COMPONENT spt-cmake-exports)
|
||||
COMPONENT cirt-cmake-exports)
|
||||
|
||||
if(NOT LLVM_ENABLE_IDE)
|
||||
# Add a dummy target so this can be used with LLVM_DISTRIBUTION_COMPONENTS
|
||||
add_custom_target(spt-cmake-exports)
|
||||
add_llvm_install_targets(install-spt-cmake-exports
|
||||
COMPONENT spt-cmake-exports)
|
||||
add_custom_target(cirt-cmake-exports)
|
||||
add_llvm_install_targets(install-cirt-cmake-exports
|
||||
COMPONENT cirt-cmake-exports)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
file(GLOB globbed *.cpp)
|
||||
|
||||
add_mlir_library(SPTEmitVerilog
|
||||
add_mlir_library(CIRTEmitVerilog
|
||||
${globbed}
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
)
|
||||
|
||||
add_dependencies(SPTEmitVerilog MLIRFIRRTL)
|
||||
target_link_libraries(SPTEmitVerilog MLIRFIRRTL)
|
||||
add_dependencies(CIRTEmitVerilog MLIRFIRRTL)
|
||||
target_link_libraries(CIRTEmitVerilog MLIRFIRRTL)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
file(GLOB globbed *.cpp)
|
||||
|
||||
add_mlir_library(SPTFIRParser
|
||||
add_mlir_library(CIRTFIRParser
|
||||
${globbed}
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
)
|
||||
|
||||
add_dependencies(SPTFIRParser MLIRFIRRTL)
|
||||
target_link_libraries(SPTFIRParser MLIRFIRRTL)
|
||||
add_dependencies(CIRTFIRParser MLIRFIRRTL)
|
||||
target_link_libraries(CIRTFIRParser MLIRFIRRTL)
|
||||
|
|
|
@ -12,12 +12,12 @@ set(CIRT_TEST_DEPENDS
|
|||
firtool
|
||||
)
|
||||
|
||||
add_lit_testsuite(check-spt "Running the SPT regression tests"
|
||||
add_lit_testsuite(check-cirt "Running the CIRT regression tests"
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
DEPENDS ${CIRT_TEST_DEPENDS}
|
||||
)
|
||||
set_target_properties(check-spt PROPERTIES FOLDER "Tests")
|
||||
set_target_properties(check-cirt PROPERTIES FOLDER "Tests")
|
||||
|
||||
add_lit_testsuites(SPT ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
add_lit_testsuites(CIRT ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${CIRT_TEST_DEPS}
|
||||
)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
// RUN: cirt-opt --help | FileCheck %s
|
||||
//
|
||||
// CHECK: OVERVIEW: spt modular optimizer driver
|
||||
// CHECK: OVERVIEW: cirt modular optimizer driver
|
||||
|
|
|
@ -16,7 +16,7 @@ from lit.llvm.subst import FindTool
|
|||
# Configuration file for the 'lit' test runner.
|
||||
|
||||
# name: The name of this test suite.
|
||||
config.name = 'SPT'
|
||||
config.name = 'CIRT'
|
||||
|
||||
config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
|
||||
|
||||
|
@ -27,7 +27,7 @@ config.suffixes = ['.td', '.mlir', '.ll', '.fir']
|
|||
config.test_source_root = os.path.dirname(__file__)
|
||||
|
||||
# test_exec_root: The root path where tests should be run.
|
||||
config.test_exec_root = os.path.join(config.spt_obj_root, 'test')
|
||||
config.test_exec_root = os.path.join(config.cirt_obj_root, 'test')
|
||||
|
||||
config.substitutions.append(('%PATH%', config.environment['PATH']))
|
||||
config.substitutions.append(('%shlibext', config.llvm_shlib_ext))
|
||||
|
@ -46,12 +46,12 @@ config.excludes = ['Inputs', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt']
|
|||
config.test_source_root = os.path.dirname(__file__)
|
||||
|
||||
# test_exec_root: The root path where tests should be run.
|
||||
config.test_exec_root = os.path.join(config.spt_obj_root, 'test')
|
||||
config.test_exec_root = os.path.join(config.cirt_obj_root, 'test')
|
||||
|
||||
# Tweak the PATH to include the tools dir.
|
||||
llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)
|
||||
|
||||
tool_dirs = [config.spt_tools_dir, config.mlir_tools_dir, config.llvm_tools_dir]
|
||||
tool_dirs = [config.cirt_tools_dir, config.mlir_tools_dir, config.llvm_tools_dir]
|
||||
tools = [
|
||||
'cirt-opt',
|
||||
'cirt-translate',
|
||||
|
|
|
@ -31,9 +31,9 @@ config.host_arch = "@HOST_ARCH@"
|
|||
config.mlir_src_root = "@MLIR_SOURCE_DIR@"
|
||||
config.mlir_obj_root = "@MLIR_BINARY_DIR@"
|
||||
config.mlir_tools_dir = "@MLIR_TOOLS_DIR@"
|
||||
config.spt_src_root = "@CIRT_SOURCE_DIR@"
|
||||
config.spt_obj_root = "@CIRT_BINARY_DIR@"
|
||||
config.spt_tools_dir = "@CIRT_TOOLS_DIR@"
|
||||
config.cirt_src_root = "@CIRT_SOURCE_DIR@"
|
||||
config.cirt_obj_root = "@CIRT_BINARY_DIR@"
|
||||
config.cirt_tools_dir = "@CIRT_TOOLS_DIR@"
|
||||
|
||||
# Support substitution of the tools_dir with user parameters. This is
|
||||
# used when we can't determine the tool dir at configuration time.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//===- cirt-opt.cpp - The cirt-opt driver ---------------------------------===//
|
||||
//
|
||||
// This file implements the 'cirt-opt' tool, which is the spt analog of
|
||||
// This file implements the 'cirt-opt' tool, which is the cirt analog of
|
||||
// mlir-opt, used to drive compiler passes, e.g. for testing.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -75,7 +75,7 @@ int main(int argc, char **argv) {
|
|||
PassPipelineCLParser passPipeline("", "Compiler passes to run");
|
||||
|
||||
// Parse pass names in main to ensure static initialization completed.
|
||||
cl::ParseCommandLineOptions(argc, argv, "spt modular optimizer driver\n");
|
||||
cl::ParseCommandLineOptions(argc, argv, "cirt modular optimizer driver\n");
|
||||
|
||||
MLIRContext context;
|
||||
if (showDialects) {
|
||||
|
|
|
@ -3,8 +3,8 @@ set(LIBS
|
|||
MLIRIR
|
||||
MLIRSupport
|
||||
|
||||
SPTEmitVerilog
|
||||
SPTFIRParser
|
||||
CIRTEmitVerilog
|
||||
CIRTFIRParser
|
||||
)
|
||||
add_llvm_tool(cirt-translate
|
||||
cirt-translate.cpp
|
||||
|
|
|
@ -60,7 +60,7 @@ int main(int argc, char **argv) {
|
|||
translationRequested("", llvm::cl::desc("Translation to perform"),
|
||||
llvm::cl::Required);
|
||||
|
||||
llvm::cl::ParseCommandLineOptions(argc, argv, "SPT translation driver\n");
|
||||
llvm::cl::ParseCommandLineOptions(argc, argv, "CIRT translation driver\n");
|
||||
|
||||
std::string errorMessage;
|
||||
auto input = openInputFile(inputFilename, &errorMessage);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
set(LIBS
|
||||
MLIRFIRRTL
|
||||
SPTEmitVerilog
|
||||
SPTFIRParser
|
||||
CIRTEmitVerilog
|
||||
CIRTFIRParser
|
||||
|
||||
MLIRParser
|
||||
MLIRSupport
|
||||
|
|
|
@ -118,7 +118,7 @@ int main(int argc, char **argv) {
|
|||
registerDialect<firrtl::FIRRTLDialect>();
|
||||
|
||||
// Parse pass names in main to ensure static initialization completed.
|
||||
cl::ParseCommandLineOptions(argc, argv, "spt modular optimizer driver\n");
|
||||
cl::ParseCommandLineOptions(argc, argv, "cirt modular optimizer driver\n");
|
||||
|
||||
// Figure out the input format if unspecified.
|
||||
if (inputFormat == InputUnspecified) {
|
||||
|
|
Loading…
Reference in New Issue