forked from llvm/Polygeist
-
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.
- Loading branch information
0 parents
commit 988ea75
Showing
155 changed files
with
21,672 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BasedOnStyle: LLVM |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,-misc-non-private-member-variables-in-classes,readability-identifier-naming' | ||
CheckOptions: | ||
- key: readability-identifier-naming.ClassCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.EnumCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.FunctionCase | ||
value: camelBack | ||
- key: readability-identifier-naming.MemberCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.ParameterCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.UnionCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.VariableCase | ||
value: CamelCase | ||
- key: readability-identifier-naming.IgnoreMainLikeFunctions | ||
value: 1 | ||
|
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Since version 2.23 (released in August 2019), git-blame has a feature | ||
# to ignore or bypass certain commits. | ||
# | ||
# This file contains a list of commits that are not likely what you | ||
# are looking for in a blame, such as mass reformatting or renaming. | ||
# You can set this file as a default ignore file for blame by running | ||
# the following command. | ||
# | ||
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs | ||
|
||
# r365730: [Coding style change][lld] Rename variables for non-ELF ports | ||
136d27ab4de0c1d5dedfecc32a9857be78fa0648 | ||
|
||
# r365595: [Coding style change] Rename variables so that they start with a lowercase letter | ||
3837f4273fcc40cc519035479aefe78e5cbd3055 | ||
|
||
# r280751: [Coding style change][lldb] Moved LLDB code base to use LLVM style | ||
b9c1b51e45b845debb76d8658edabca70ca56079 | ||
|
||
# r302421: That change incorrectly changed line endings in some libc++ files | ||
9669df28d4fd3c52d09f451186bd217cdc3322c0 | ||
|
||
# r302496: That is the revert of r302421 | ||
ff63090b0e1072bd398b8efef8ae2291613a6ec9 | ||
|
||
# Fix more line endings changed in r320089. NFC. | ||
d8f0e6caa91e230a486c948ab643174e40bdf215 | ||
|
||
# Correct line endings that got mixed up in r320089; NFC. | ||
29dc5ded45447915d96ef7ca3f02acf2232282e0 | ||
|
||
# Remove line-endings added by r320089. NFC. | ||
100a0eedc00b2bf48bcdc6c209c000745a4a0e48 | ||
|
||
# Cleanup __config indention. NFC. | ||
2b772b930e097ed6f06d698a51e291c7fd318baa | ||
|
||
# Fixing whitespace problems | ||
94b2dd0998230c758abd92c99d3700c971f7a31a | ||
|
||
# Wiped out some non-ascii characters that snuck into the copyright. | ||
5b08a8a43254ed30bd953e869b0fd9fc1e8b82d0 |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Configuration for Repo Lockdown - https://github.com/dessant/repo-lockdown | ||
|
||
skipCreatedBefore: "2020-03-21" | ||
|
||
pulls: | ||
comment: > | ||
This repository does not accept pull requests. | ||
Please follow http://llvm.org/docs/Contributing.html#how-to-submit-a-patch for contribution to LLVM. |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Github action workflows should be stored in this directrory. |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: MLIR-GPU Test CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
name: Build ${{ matrix.build }} ${{ matrix.os }} ${{ matrix.compiler }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
build: ["Release"] #, "Debug"] # "RelWithDebInfo" | ||
os: [ubuntu-18.04] | ||
|
||
steps: | ||
- name: add dependencies | ||
run: sudo apt-get install -y ninja-build #cmake binutils-gold binutils binutils-dev ${{ matrix.compiler }} ${{ matrix.linker-pkg }} | ||
- name: setup cymbl | ||
run: | | ||
cd / | ||
sudo wget --no-verbose https://github.com/cymbl/cymbl.github.io/releases/download/0.0.1/LLVM-11.0.0git-Linux.sh | ||
printf "y\nn\n" | sudo bash LLVM-11.0.0git-Linux.sh | ||
printf "{\"refreshToken\":\"%s\"}" "${{ secrets.SuperSecret }}" > ~/.cymblconfig | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
path: src | ||
|
||
|
||
- name: mkdir | ||
run: mkdir build | ||
- name: cmake | ||
run: | | ||
cd build | ||
CYMBL=OFF cmake ../src/llvm -GNinja -DLLVM_ENABLE_PROJECTS="llvm;clang;mlir" -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_C_COMPILER=/bin/clang -DCMAKE_CXX_COMPILER=/bin/clang++ -DCMAKE_ASM_COMPILER=/bin/clang -DCMAKE_CXX_FLAGS="-Wno-c++11-narrowing" | ||
- name: build | ||
run: | | ||
cd build | ||
cymbld & disown | ||
sleep 10 | ||
ninja -j1000 mlir-clang mlir-opt | ||
- name: test mlir-clang | ||
run: | | ||
cd build | ||
ninja -j1000 check-mlir-clang | ||
- name: test mlir | ||
run: | | ||
cd build | ||
ninja -j1000 check-mlir |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: run-clang-format | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: DoozyX/[email protected] | ||
with: | ||
source: './mlir/tools/mlir-clang' | ||
exclude: './mlir/tools/mlir-clang/Test' | ||
clangFormatVersion: 11 | ||
style: llvm |
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#==============================================================================# | ||
# This file specifies intentionally untracked files that git should ignore. | ||
# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html | ||
# | ||
# This file is intentionally different from the output of `git svn show-ignore`, | ||
# as most of those are useless. | ||
#==============================================================================# | ||
|
||
#==============================================================================# | ||
# File extensions to be ignored anywhere in the tree. | ||
#==============================================================================# | ||
# Temp files created by most text editors. | ||
*~ | ||
# Merge files created by git. | ||
*.orig | ||
# Byte compiled python modules. | ||
*.pyc | ||
# vim swap files | ||
.*.sw? | ||
.sw? | ||
#OS X specific files. | ||
.DS_store | ||
|
||
# Ignore the user specified CMake presets in subproject directories. | ||
/*/CMakeUserPresets.json | ||
|
||
# Nested build directory | ||
/build* | ||
|
||
#==============================================================================# | ||
# Explicit files to ignore (only matches one). | ||
#==============================================================================# | ||
# Various tag programs | ||
/tags | ||
/TAGS | ||
/GPATH | ||
/GRTAGS | ||
/GSYMS | ||
/GTAGS | ||
/ID | ||
.gitusers | ||
autom4te.cache | ||
cscope.files | ||
cscope.out | ||
autoconf/aclocal.m4 | ||
autoconf/autom4te.cache | ||
/compile_commands.json | ||
# Visual Studio built-in CMake configuration | ||
/CMakeSettings.json | ||
# CLion project configuration | ||
/.idea | ||
|
||
#==============================================================================# | ||
# Directories to ignore (do not add trailing '/'s, they skip symlinks). | ||
#==============================================================================# | ||
# VS2017 and VSCode config files. | ||
.vscode | ||
.vs | ||
# pythonenv for github Codespaces | ||
pythonenv* | ||
# clangd index. (".clangd" is a config file now, thus trailing slash) | ||
.clangd/ | ||
.cache | ||
# static analyzer regression testing project files | ||
/clang/utils/analyzer/projects/*/CachedSource | ||
/clang/utils/analyzer/projects/*/PatchedSource | ||
/clang/utils/analyzer/projects/*/ScanBuildResults | ||
/clang/utils/analyzer/projects/*/RefScanBuildResults | ||
# automodapi puts generated documentation files here. | ||
/lldb/docs/python_api/ |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "llvm-project"] | ||
path = llvm-project | ||
url = [email protected]:llvm/llvm-project |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
macro(set_clang_windows_version_resource_properties name) | ||
if(DEFINED windows_resource_file) | ||
set_windows_version_resource_properties(${name} ${windows_resource_file} | ||
VERSION_MAJOR ${CLANG_VERSION_MAJOR} | ||
VERSION_MINOR ${CLANG_VERSION_MINOR} | ||
VERSION_PATCHLEVEL ${CLANG_VERSION_PATCHLEVEL} | ||
VERSION_STRING "${CLANG_VERSION} (${BACKEND_PACKAGE_STRING})" | ||
PRODUCT_NAME "clang") | ||
endif() | ||
endmacro() | ||
|
||
macro(add_clang_executable name) | ||
add_llvm_executable( ${name} ${ARGN} ) | ||
set_target_properties(${name} PROPERTIES FOLDER "Clang executables") | ||
set_clang_windows_version_resource_properties(${name}) | ||
endmacro(add_clang_executable) | ||
|
||
macro(add_clang_tool name) | ||
if (NOT CLANG_BUILD_TOOLS) | ||
set(EXCLUDE_FROM_ALL ON) | ||
endif() | ||
|
||
add_clang_executable(${name} ${ARGN}) | ||
# add_dependencies(${name} clang-resource-headers) | ||
|
||
if (CLANG_BUILD_TOOLS) | ||
get_target_export_arg(${name} Clang export_to_clangtargets) | ||
install(TARGETS ${name} | ||
${export_to_clangtargets} | ||
RUNTIME DESTINATION bin | ||
COMPONENT ${name}) | ||
|
||
if(NOT LLVM_ENABLE_IDE) | ||
add_llvm_install_targets(install-${name} | ||
DEPENDS ${name} | ||
COMPONENT ${name}) | ||
endif() | ||
set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) | ||
endif() | ||
endmacro() | ||
|
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
|
||
if(POLICY CMP0068) | ||
cmake_policy(SET CMP0068 NEW) | ||
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) | ||
endif() | ||
|
||
if(POLICY CMP0075) | ||
cmake_policy(SET CMP0075 NEW) | ||
endif() | ||
|
||
if(POLICY CMP0077) | ||
cmake_policy(SET CMP0077 NEW) | ||
endif() | ||
|
||
project(polygeist LANGUAGES CXX C) | ||
|
||
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to") | ||
|
||
message(STATUS "Searching for MLIRConfig.cmake in: ${MLIR_DIR}") | ||
find_package(MLIR REQUIRED CONFIG) | ||
|
||
find_package(CLANG REQUIRED CONFIG) | ||
message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}") | ||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") | ||
message(STATUS "Using ClangConfig.cmake in: ${CLANG_DIR}") | ||
|
||
list(APPEND CMAKE_MODULE_PATH "${MLIR_CMAKE_DIR}") | ||
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}") | ||
list(APPEND CMAKE_MODULE_PATH "${CLANG_CMAKE_DIR}") | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}") | ||
include(TableGen) | ||
include(AddLLVM) | ||
include(AddMLIR) | ||
include(AddClang) | ||
include(HandleLLVMOptions) | ||
|
||
set(POLYGEIST_TOOLS_DIR ${CMAKE_BINARY_DIR}) | ||
|
||
include_directories(${LLVM_INCLUDE_DIRS}) | ||
include_directories(${CLANG_INCLUDE_DIRS}) | ||
include_directories(${MLIR_INCLUDE_DIRS}) | ||
include_directories(${PROJECT_SOURCE_DIR}/include) | ||
include_directories(${PROJECT_BINARY_DIR}/include) | ||
link_directories(${LLVM_BUILD_LIBRARY_DIR}) | ||
add_definitions(${LLVM_DEFINITIONS}) | ||
|
||
set(LLVM_LIT_ARGS "-sv" CACHE STRING "lit default options") | ||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") | ||
|
||
add_subdirectory(include) | ||
add_subdirectory(mlir-clang) | ||
add_subdirectory(lib) |
Oops, something went wrong.