-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
7 changed files
with
575 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,6 @@ | ||
BasedOnStyle: LLVM | ||
IncludeCategories: | ||
- Regex: "llvm/" | ||
Priority: 1 | ||
- Regex: ".*" | ||
Priority: 2 |
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,39 @@ | ||
name: DAG grep | ||
|
||
on: | ||
issues: | ||
types: labeled | ||
|
||
jobs: | ||
build: | ||
if: github.event.label.name == 'grep' | ||
runs-on: self-hosted | ||
|
||
permissions: | ||
issues: write | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
- name: Set up Git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git -C llvm/llvm-project checkout . | ||
git -C llvm/llvm-project clean -fdx | ||
- name: Get Pattern IR | ||
run: | | ||
echo "${{ github.event.issue.body }}" | sed -n '/^```/,/^```/ p' | sed '/^```/ d' > ${{ github.workspace }}/test.ll | ||
- name: Run LLVM DAG Grep | ||
run: ${{ github.workspace }}/scripts/run_dag_grep.sh | ||
|
||
- name: Report | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
filePath: scripts/grep.md |
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ CHANGELOGS | |
patch.diff | ||
*.bench_tmp.ll | ||
.vscode | ||
build | ||
.cache |
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,21 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
set(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL) | ||
set(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
project(LLVMTools) | ||
|
||
find_package(LLVM REQUIRED CONFIG) | ||
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}") | ||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") | ||
include(AddLLVM) | ||
|
||
include_directories(${LLVM_INCLUDE_DIRS}) | ||
set(LLVM_LINK_COMPONENTS core support irreader irprinter analysis) | ||
add_llvm_executable(daggrep daggrep.cpp) |
Oops, something went wrong.