-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated MLIR backend to the new build framework
- Loading branch information
Showing
15 changed files
with
110 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,30 @@ | ||
# Copyright 2023 Magnus Sjalander <[email protected]> | ||
# Copyright 2024 Magnus Sjalander <[email protected]> | ||
# See COPYING for terms of redistribution. | ||
|
||
# Check if the MLIR RVSDG Dialect has been compiled by looking for the compile library | ||
ifneq (, $(shell command -v $(MLIR_ROOT)/lib/libMLIRRVSDG.a 2> /dev/null)) | ||
$(info Found the MLIR RVSDG Dialect) | ||
CPPFLAGS += \ | ||
-DMLIR_ENABLED=1 | ||
libmlir_SOURCES = \ | ||
jlm/mlir/backend/mlirgen.cpp \ | ||
jlm/mlir/frontend/rvsdggen.cpp \ | ||
|
||
MLIR_LDFLAGS = \ | ||
-lmlir \ | ||
-L$(MLIR_ROOT)/lib \ | ||
-lMLIR \ | ||
-lMLIRJLM \ | ||
-lMLIRRVSDG | ||
|
||
LDFLAGS += $(MLIR_LDFLAGS) | ||
endif | ||
libmlir_HEADERS = \ | ||
jlm/mlir/backend/mlirgen.hpp \ | ||
jlm/mlir/frontend/rvsdggen.hpp \ | ||
|
||
LIBMLIR_SRC = \ | ||
jlm/mlir/backend/mlirgen.cpp \ | ||
jlm/mlir/frontend/rvsdggen.cpp \ | ||
libmlir_TESTS += \ | ||
tests/jlm/mlir/backend/TestMlirGen \ | ||
tests/jlm/mlir/frontend/TestRvsdgGen \ | ||
|
||
.PHONY: libmlir-debug | ||
libmlir-debug: CXXFLAGS += $(CXXFLAGS_DEBUG) | ||
libmlir-debug: $(JLM_BUILD)/libmlir.a | ||
libmlir_TEST_LIBS += \ | ||
libmlir \ | ||
libllvm \ | ||
librvsdg \ | ||
libutil \ | ||
libjlmtest \ | ||
|
||
.PHONY: libmlir-release | ||
libmlir-release: CXXFLAGS += -O3 | ||
libmlir-release: $(JLM_BUILD)/libmlir.a | ||
|
||
$(JLM_BUILD)/libmlir.a: CPPFLAGS += -I$(JLM_ROOT) -I$(shell $(LLVMCONFIG) --includedir) | ||
$(JLM_BUILD)/libmlir.a: $(patsubst %.cpp, $(JLM_BUILD)/%.la, $(LIBMLIR_SRC)) | ||
libmlir_TEST_EXTRA_LDFLAGS = \ | ||
$(shell $(LLVMCONFIG) --ldflags --libs --system-libs) \ | ||
-L$(MLIR_PATH)/lib \ | ||
-lMLIR \ | ||
-lMLIRJLM \ | ||
-lMLIRRVSDG \ | ||
|
||
.PHONY: libmlir-clean | ||
libmlir-clean: | ||
@rm -rf $(JLM_BUILD)/libmlir.a | ||
$(eval $(call common_library,libmlir)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters