Skip to content

Commit f560d7d

Browse files
committed
Add an P4HIR-to-P4 syntax exporter.
Signed-off-by: fruffy <fruffy@nyu.edu>
1 parent e4770ca commit f560d7d

File tree

110 files changed

+5524
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+5524
-9
lines changed

.clang-tidy

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
Checks:
3+
'clang-diagnostic-*,
4+
clang-analyzer-*,
5+
modernize-*,
6+
performance-*,
7+
readability-*,
8+
bugprone-*,
9+
cppcoreguidelines-*,
10+
boost-*,
11+
hicpp-*,
12+
misc-*,
13+
llvm-*,
14+
google-*,
15+
-modernize-use-trailing-return-type,
16+
-misc-confusable-identifiers,
17+
-readability-identifier-length,
18+
-cppcoreguidelines-owning-memory,
19+
-bugprone-easily-swappable-parameters,
20+
-llvm-header-guard,
21+
-llvm-include-order,
22+
-misc-no-recursion'
23+
FormatStyle: file
24+
WarningsAsErrors: ''
25+
HeaderFilterRegex: ''
26+
UseColor: true
27+
...

.clangd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CompileFlags:
2+
CompilationDatabase: third_party/p4c/build/

CPPLINT.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
third_party/p4c/CPPLINT.cfg

build_tools/build_p4c_with_p4mlir_ext.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ fi
3232
# Configure CMake flags
3333
CMAKE_FLAGS="-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER:-clang}"
3434
CMAKE_FLAGS+=" -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER:-clang++}"
35+
CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=RelWithDebInfo"
3536

3637
# Configure P4C CMake flags
3738
# https://github.com/p4lang/p4c/blob/main/CMakeLists.txt

lib/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
add_subdirectory(Dialect)
2-
add_subdirectory(Transforms)
2+
add_subdirectory(Transforms)
3+
add_subdirectory(Utilities)

lib/Utilities/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
set(UTILITIES
2+
export_to_p4.cpp
3+
)
4+
5+
6+
add_library(p4mlir_utilities STATIC ${UTILITIES})

0 commit comments

Comments
 (0)