[P4-dev] p4c compiler output in .p4i
mbudiu at vmware.com
Thu Jun 8 16:56:25 EDT 2017
If the user does not ask for the preprocessor output it probably should not be persisted.
From: Han Wang<mailto:hw342 at cornell.edu>
Sent: Thursday, June 8, 2017 1:50 PM
To: hemant at mnkcg.com<mailto:hemant at mnkcg.com>
Cc: p4-dev<mailto:p4-dev at lists.p4.org>
Subject: Re: [P4-dev] p4c compiler output in .p4i
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<mailto: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>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev