[P4-dev] p4c compiler output in .p4i
hw342 at cornell.edu
Thu Jun 8 16:49:51 EDT 2017
p4c is a compiler driver that invokes the other components of the p4 tool chain to process a p4 program. Specifically, for bmv2, the compiler driver invokes preprocessor and p4c-bm2-ss to generate the output json configuration for bmv2.
You can use the -### flag or --test-only flag to find out which commands are invoked by p4c compiler driver.
In this case, the .p4i file is the output of the preprocessor step.
> On Jun 8, 2017, at 1:40 PM, hemant at mnkcg.com wrote:
> The compiler-design slides included with the docs for the p4c compiler do not include some details. Thus a question:
> When I use p4c to compile P4-16 code in a .p4 file, the compiler outputs a .p4i file. Looking at this file, it looks like IR (Intermediate Representation) to me – am I correct? It would be good to describe this output file in the docs.
> P4-dev mailing list
> P4-dev at lists.p4.org <mailto:P4-dev at lists.p4.org>
> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org <http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev