19#ifndef BACKENDS_TOFINO_BF_P4C_PARDE_LOWERED_EXTRACT_SIMPLIFIER_H_
20#define BACKENDS_TOFINO_BF_P4C_PARDE_LOWERED_EXTRACT_SIMPLIFIER_H_
22#include <boost/range/adaptor/reversed.hpp>
24#include "backends/tofino/bf-p4c/parde/clot/clot_info.h"
25#include "backends/tofino/bf-p4c/parde/lowered/helpers.h"
26#include "backends/tofino/bf-p4c/phv/phv_fields.h"
41 using ExtractSequence = std::vector<const IR::BFN::LoweredExtractPhv *>;
44 void add(
const IR::BFN::Extract *extract);
45 void add(
const IR::BFN::ExtractClot *extract);
46 void add(
const IR::BFN::ExtractPhv *extract);
55 template <
typename InputBufferRValType>
57 const ExtractSequence &extracts,
59 template <
typename InputBufferRValType>
60 static const ExtractSequence mergeExtractsFor(
PHV::Container container,
61 const ExtractSequence &extracts);
65 const IR::BFN::LoweredExtractPhv *mergeExtractsForConstants(
PHV::Container container,
66 const ExtractSequence &extracts);
72 std::map<gress_t, std::map<unsigned, unsigned>> clotTagToCsumUnit);
Definition clot_info.h:41
Definition ordered_map.h:32
Definition phv_fields.h:1095
ordered_map< PHV::Container, ExtractSequence > extractFromPacketByContainer
Definition extract_simplifier.h:77
static const IR::BFN::LoweredExtractPhv * createMergedExtract(PHV::Container container, const ExtractSequence &extracts, nw_byteinterval bufferRange)
Definition extract_simplifier.cpp:161
IR::Vector< IR::BFN::LoweredParserPrimitive > lowerExtracts(std::map< gress_t, std::map< unsigned, unsigned > > clotTagToCsumUnit)
Definition extract_simplifier.cpp:328
void add(const IR::BFN::Extract *extract)
Add a new extract operation to the sequence.
Definition extract_simplifier.cpp:25
Definition lower_parser.cpp:72
Definition lib/bitrange.h:253