Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
341dfe5
Using gino components - draft
fsossai Feb 24, 2024
52c3826
Deleted useless Makefiles
fsossai Feb 24, 2024
20dd25a
Added `gino-config`
fsossai Feb 24, 2024
e74e1dd
Adapted scripts
fsossai Feb 24, 2024
a98ed2d
Added `.gitignore` for tests
fsossai Feb 24, 2024
0ee19d4
Reset `installDir` in all scripts
fsossai Feb 24, 2024
ff15a67
Added missing shebang to all scripts
fsossai Feb 24, 2024
74a92af
Scripts recursively display error lines
fsossai Feb 25, 2024
c99d7ec
Added `.clang-format` and reformatted all sources
fsossai Feb 25, 2024
dfdde2a
Fetching noelle if it's enabled
fsossai Feb 25, 2024
bdf9430
Check noelle in the Makefile
fsossai Feb 25, 2024
5183023
Typo
fsossai Feb 25, 2024
69a0e03
Loading noelle tools through `noelle-config`
fsossai Feb 28, 2024
361adc2
Constistency
fsossai Feb 29, 2024
03bd813
Major refactoring
fsossai Mar 16, 2024
bf7786d
Updated `.gitignore` for tests
fsossai Mar 16, 2024
d8ede5a
Updated `README.md`
fsossai Mar 20, 2024
fd0a7c0
Updated `README.md`
fsossai Mar 20, 2024
f13ed2c
Updated figures
fsossai Mar 20, 2024
bca42ac
Removed useless lines
fsossai Apr 17, 2024
4ed86b1
Changed `--gino-libs` to `--core-libs` for consistency
fsossai Apr 17, 2024
2084b64
Added `Uninstall` section to `README.md`
fsossai Apr 19, 2024
924822f
Completed `README.md`
fsossai Apr 19, 2024
62331d2
Fixed license
fsossai Apr 19, 2024
5ee4850
Merge branch 'master' into refactoring
scampanoni Apr 22, 2024
e8a9651
Renamed `noelle-` parameters to `gino-`
fsossai Apr 22, 2024
2493725
Changed `noelle.parallelizer.looporder` to `gino.looporder`
fsossai Apr 22, 2024
8fdd481
Improved `PlanInfo`
fsossai Apr 22, 2024
83081fc
Formatted code
fsossai Apr 22, 2024
fd95e9b
Fixed accidental computation of LC in `PlanInfo`
fsossai Apr 22, 2024
cd2dc06
Capitalized pass names for consistency
fsossai Apr 22, 2024
47ee19f
Added missing file
fsossai Apr 22, 2024
f9007f2
Renamed GINO APIs
fsossai Apr 22, 2024
6966cc5
Renamed macro guards
fsossai Apr 22, 2024
6214509
Consistency
fsossai Apr 22, 2024
a2c3c0e
Merge branch 'master' into refactoring
fsossai Apr 28, 2024
8b667ee
Adapted pass names to `gino-`
fsossai Apr 28, 2024
06ab260
Merge branch 'master' into refactoring
fsossai Aug 30, 2024
fe0483a
Fixed conflicts
fsossai Aug 30, 2024
e279ac5
Build type as an option. Fixed `enable.in`
fsossai Aug 30, 2024
088d8e8
Updated `failing_tests` with new options
fsossai Aug 30, 2024
fc5877e
Updated `generateRegressions` with new options
fsossai Aug 30, 2024
b01d226
Integrated changes from `tests`
fsossai Aug 30, 2024
eb1547f
Merge branch 'master' into refactoring
fsossai Nov 18, 2024
9912f82
Added `tests/.gitignore`
fsossai Nov 18, 2024
730b677
`gino-force` registered twice
fsossai Nov 19, 2024
fd1ab8e
`gino-planner-force` and `gino-parallelizer-force` coexist
fsossai Nov 19, 2024
79a9046
Improved `gino-plan-info`
fsossai Nov 26, 2024
ab4b2a2
Improved `gino-plan-info`
fsossai Nov 26, 2024
267a324
Updated .gitignore
fsossai Nov 26, 2024
5b83b82
Merge branch 'master' into refactoring
fsossai Jul 3, 2025
5ed99c3
[cmake] avoid conflicts with other projects for `CompileCommands` tar…
fsossai Jul 3, 2025
470776d
Fetching Noelle if needed
fsossai Jul 3, 2025
c9b55f3
Finding noelle
fsossai Jul 9, 2025
a29b598
Changed message
fsossai Jul 9, 2025
6578af2
Fixed warning
fsossai Jul 9, 2025
5567248
Fixed missing include
fsossai Jul 9, 2025
50706dd
Fixed `enable.in`
fsossai Jul 9, 2025
c599c71
Added `noelle-prefix` option to `gino-config`
fsossai Jul 9, 2025
24a54af
Removed finding noelle through `noelle-config` because of inconsisten…
fsossai Jul 9, 2025
79705a0
Enhanced `gino-config`
fsossai Jul 9, 2025
54a3a0e
Runtime in now installed
fsossai Jul 9, 2025
1c06243
Including both `core` and `tools` from Noelle
fsossai Jul 10, 2025
2906458
Setting build type
fsossai Jul 10, 2025
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
16 changes: 0 additions & 16 deletions .githooks/Makefile

This file was deleted.

2 changes: 0 additions & 2 deletions .githooks/hooks/pre-commit → .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
#
# Pre-commit hook to run clang-format on all C/C++ files
# before they are commited.
#
# To enable this hook, rename this file to "pre-commit".

if git rev-parse --verify HEAD >/dev/null 2>&1
then
Expand Down
155 changes: 155 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
cmake_minimum_required(VERSION 3.13)

project(gino)

include(FetchContent)

include(config.default.cmake)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/config.cmake)
include(config.cmake)
endif()

if(DEFINED GINO_INSTALL_DIR)
get_filename_component(GINO_INSTALL_DIR ${GINO_INSTALL_DIR} ABSOLUTE)
set(CMAKE_INSTALL_PREFIX ${GINO_INSTALL_DIR})
else()
get_filename_component(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} ABSOLUTE)
set(GINO_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
endif()

if(NOT DEFINED GINO_BUILD_TYPE)
set(GINO_BUILD_TYPE "Debug")
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(LLVM 14 REQUIRED CONFIG)

string(ASCII 27 Esc)
set(Purple "${Esc}[35m")
set(Green "${Esc}[32m")
set(Red "${Esc}[31m")
set(ColorReset "${Esc}[m")

function(gino_acquire_option OPT)
if(${OPT} MATCHES "ON|On|on|1")
set(${OPT} ON PARENT_SCOPE)
message(STATUS "${Purple}Option${ColorReset} ${OPT} ${Green}ON${ColorReset}")
elseif(${OPT} MATCHES "OFF|Off|off|0")
set(${OPT} OFF PARENT_SCOPE)
message(STATUS "${Purple}Option${ColorReset} ${OPT} ${Red}OFF${ColorReset}")
elseif(${OPT} MATCHES "OFF|Off|off|0")
else()
message(FATAL_ERROR "${OPT} must be either ON or OFF")
endif()
endfunction()

message(STATUS "${Purple}Install directory${ColorReset} is ${CMAKE_INSTALL_PREFIX}")

gino_acquire_option(GINO_TOOLS)

if(NOT DEFINED NOELLE_INSTALL_DIR OR (NOELLE_INSTALL_DIR STREQUAL ""))
message(STATUS "${Purple}NOELLE_INSTALL_DIR${ColorReset} is not defined. Noelle will be fetched from GitHub.")
include(FetchContent)
set(NOELLE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
FetchContent_Declare(
noelle
GIT_REPOSITORY "https://github.com/arcana-lab/noelle.git"
GIT_TAG master
)
FetchContent_MakeAvailable(noelle)
FetchContent_GetProperties(noelle)
file(
GLOB_RECURSE NOELLE_CORE_DIRS LIST_DIRECTORIES true
"${noelle_SOURCE_DIR}/src/core/*"
"${noelle_SOURCE_DIR}/src/tools/*"
)
foreach(dir ${NOELLE_CORE_DIRS})
if(IS_DIRECTORY ${dir} AND EXISTS "${dir}/include")
include_directories(${dir}/include)
endif()
endforeach()
else()
message(STATUS "${Purple}NOELLE_INSTALL_DIR${ColorReset} is ${NOELLE_INSTALL_DIR}")
include_directories(${NOELLE_INSTALL_DIR}/include)
endif()

set(GINO_CMAKE_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_BUILD_TYPE ${GINO_BUILD_TYPE})

get_filename_component(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} REALPATH)
get_filename_component(GINO_CMAKE_ROOT ${GINO_CMAKE_ROOT} REALPATH)

file(READ ${GINO_CMAKE_ROOT}/VERSION GINO_VERSION)
string(STRIP ${GINO_VERSION} GINO_VERSION)

configure_file(enable.in enable @ONLY)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/enable
DESTINATION ${GINO_CMAKE_ROOT}
)

install(
PROGRAMS ${GINO_CMAKE_ROOT}/.githooks/pre-commit
DESTINATION ${GINO_CMAKE_ROOT}/.git/hooks
)

enable_language(C CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

find_package(LLVM 14 REQUIRED CONFIG)
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
link_directories(${LLVM_LIBRARY_DIRS})

message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")

# prepare the pass to be included in the source tree
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")
include(AddLLVM)
include(HandleLLVMOptions)

include_directories(
${LLVM_INCLUDE_DIRS}
)

set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/)
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/)

add_compile_options(${GINO_CXX_FLAGS})

add_definitions(
-D__STDC_LIMIT_MACROS
-D__STDC_CONSTANT_MACROS
)

add_custom_target(
GinoCompileCommands ALL
COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_BINARY_DIR}/compile_commands.json
${GINO_CMAKE_ROOT}/compile_commands.json
)

add_custom_target(gino_libraries)
add_custom_target(gino_tool_libraries)
set_target_properties(gino_libraries PROPERTIES NAMES "")
set_target_properties(gino_tool_libraries PROPERTIES NAMES "")

function(gino_component_declare name)
add_llvm_library(${name} MODULE)
get_target_property(names gino_libraries NAMES)
list(APPEND names ${name})
set_target_properties(gino_libraries PROPERTIES NAMES "${names}")
endfunction()

function(gino_tool_declare name)
add_llvm_library(${name} MODULE)
get_target_property(names gino_tool_libraries NAMES)
list(APPEND names ${name})
set_target_properties(gino_tool_libraries PROPERTIES NAMES "${names}")
endfunction()

add_subdirectory(src)
add_subdirectory(bin)
15 changes: 15 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
config GINO_INSTALL_DIR
string "Installation directory for Gino"
default "./install"

config NOELLE_INSTALL_DIR
string "Pre-existing installation of Noelle. If empty, Noelle will be installed anew"
default ""

config GINO_TOOLS
bool "Install all the tools build on top of Gino"
default y

config GINO_BUILD_TYPE
string "Set build type for Gino"
default "Debug"
53 changes: 34 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,42 @@
all: hooks src
BUILD_DIR ?= build
export GENERATOR ?= Unix Makefiles
export JOBS ?= 16
export MAKEFLAGS += --no-print-directory
export KCONFIG_CONFIG = .config
export MENUCONFIG_STYLE = aquatic

src:
cd src ; make ;
all: install

tests: src
cd tests ; make ;
install: compile
cmake --install $(BUILD_DIR)

hooks:
make -C .githooks
compile: $(BUILD_DIR)
cmake --build $(BUILD_DIR) -j$(JOBS)

build:
cmake -S . -B $(BUILD_DIR) -G "$(GENERATOR)" \
-DCMAKE_INSTALL_MESSAGE=LAZY \
-DCMAKE_INSTALL_PREFIX=install

tests: install
$(MAKE) -C tests

format:
cd src ; ./scripts/format_source_code.sh
find ./src -regex '.*\.[c|h]pp' | xargs clang-format -i

menuconfig:
@python3 bin/menuconfig.py

clean:
cd src ; make $@ ;
cd tests ; make $@ ;
find ./ -name .clangd -exec rm -rv {} +
find ./ -name .cache -exec rm -rv {} +
clean: uninstall
rm -rf $(BUILD_DIR)
rm -rf .config
$(MAKE) -C tests clean > /dev/null
rm -f compile_commands.json
rm -f config.cmake

uninstall: clean
cd src ; make $@ ;
rm -f enable ;
rm -rf install ;
if test -d .githooks ; then cd .githooks ; make clean ; fi;
uninstall:
-cat $(BUILD_DIR)/install_manifest.txt | xargs rm -f
rm -f enable
rm -f .git/hooks/pre-commit

.PHONY: src tests hooks format clean uninstall
.PHONY: all build install compile tests format clean uninstall
Loading