19#ifndef BF_P4C_PHV_ACTION_SOURCE_TRACKER_H_
20#define BF_P4C_PHV_ACTION_SOURCE_TRACKER_H_
24#include "bf-p4c/mau/action_analysis.h"
25#include "bf-p4c/phv/phv_fields.h"
32 enum class OpType { move, bitwise, whole_container };
33 OpType t = OpType::move;
34 bool ad_or_const =
false;
35 std::optional<PHV::FieldSlice> phv_src = std::nullopt;
43std::ostream &operator<<(std::ostream &out,
const SourceOp &src);
65 void clear() { sources.clear(); };
68 void add_sources(
const IR::MAU::Action *act,
74 return Inspector::init_apply(root);
78 bool preorder(
const IR::MAU::Action *act)
override;
81 void end_apply()
override;
85 : phv(phv), red_info(ri) {}
Definition ordered_map.h:32
ActionSourceTracker collects all source-to-destination for all field slices.
Definition action_source_tracker.h:49
ActionClassifiedSources get_sources(const PHV::FieldSlice &fs) const
Definition phv/action_source_tracker.cpp:137
Definition phv_fields.h:898
Definition phv_fields.h:1095
The namespace encapsulating PHV-related stuff.
Definition gateway.h:32
SourceOp represents a source operand.
Definition action_source_tracker.h:31
SourceOp slice(int start, int len) const
Definition phv/action_source_tracker.cpp:45
Definition reduction_or.h:47