P4LLVM: An LLVM Based P4 Compiler

Tharun Kumar Dangeti, S. VenkataKeerthy and Ramakrishna Upadrasta

Published at P4WE workshop in International Conference on Network Protocols (ICNP), 2018


Paper   OpenMp_Github

We propose P4LLVM, an LLVM based P4 compiler for achieving better optimizations to improve the runtime performance of the network. The front-end of P4LLVM converts P4-16’s code to LLVM’s Intermediate Representation (IR). This IR is passed through various optimizations of LLVM and is translated to JSON for targeting a BMV2 Switch. We show the performance improvements obtained by running LLVM optimization passes in P4LLVM when compared to P4C.