P4C
The P4 Compiler
Loading...
Searching...
No Matches
collect_hardware_constrained_fields.h
1
19
#ifndef BF_P4C_ARCH_COLLECT_HARDWARE_CONSTRAINED_FIELDS_H_
20
#define BF_P4C_ARCH_COLLECT_HARDWARE_CONSTRAINED_FIELDS_H_
21
22
#include "bf-p4c/common/ir_utils.h"
23
#include "bf-p4c/common/pragma/all_pragmas.h"
24
#include "bf-p4c/phv/phv_fields.h"
25
#include "ir/ir.h"
26
#include "lib/cstring.h"
27
#include "lib/ordered_map.h"
28
#include "lib/ordered_set.h"
29
30
namespace
BFN
{
31
32
// This class add hardware constrained fields to pipe->thread[gress].hw_constrained_fields. This is
33
// a honeypot for Alias pass, so that Alias pass can replace hardware constrained fields' Member
34
// with AliasMember or AliasSlice. And this part of information can be used in CollectPhvInfo and
35
// DisableAutoInitMetadata to set Field's properties properly for alias fields for hardware
36
// constrained fields.
37
38
class
AddHardwareConstrainedFields
:
public
Modifier
{
39
public
:
40
void
postorder(IR::BFN::Pipe *)
override
;
41
};
42
43
class
CollectHardwareConstrainedFields
:
public
PassManager
{
44
public
:
45
CollectHardwareConstrainedFields
() { addPasses({
new
AddHardwareConstrainedFields
()}); }
46
};
47
48
}
// namespace BFN
49
50
#endif
/* BF_P4C_ARCH_COLLECT_HARDWARE_CONSTRAINED_FIELDS_H_ */
BFN::AddHardwareConstrainedFields
Definition
collect_hardware_constrained_fields.h:38
BFN::CollectHardwareConstrainedFields
Definition
collect_hardware_constrained_fields.h:43
P4::Modifier
Definition
visitor.h:372
P4::PassManager
Definition
ir/pass_manager.h:40
BFN
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition
add_t2na_meta.cpp:21
backends
tofino
bf-p4c
arch
collect_hardware_constrained_fields.h
Generated by
1.12.0