P4C
The P4 Compiler
Loading...
Searching...
No Matches
update_parser_write_mode.h
1
19#ifndef BF_P4C_PARDE_UPDATE_PARSER_WRITE_MODE_H_
20#define BF_P4C_PARDE_UPDATE_PARSER_WRITE_MODE_H_
21
22#include <ir/ir.h>
23
24#include "bf-p4c/parde/check_parser_multi_write.h"
25#include "bf-p4c/parde/parser_info.h"
26#include "bf-p4c/phv/phv_fields.h"
27#include "ir/pass_manager.h"
28
30 explicit UpdateParserWriteMode(const PhvInfo &phv) {
31 auto parser_info = new CollectParserInfo;
32 auto *field_to_states = new MapFieldToParserStates(phv);
33 auto *check_write_mode_consistency =
34 new CheckWriteModeConsistency(phv, *field_to_states, *parser_info);
35
36 addPasses({
37 parser_info,
38 field_to_states,
39 check_write_mode_consistency,
40 });
41 }
42};
43
44#endif /*BF_P4C_PARDE_UPDATE_PARSER_WRITE_MODE_H_*/
Definition ir/pass_manager.h:40
Definition phv_fields.h:1095
Definition check_parser_multi_write.h:47
Map field to the parser states in which they are extracted or assigned from checksums.
Definition phv_fields.h:1755
Definition update_parser_write_mode.h:29