P4C
The P4 Compiler
|
#include <action_constraint_solver.h>
Public Member Functions | |
Result | solve () override |
solve checks that either | |
Public Member Functions inherited from solver::ActionSolverBase | |
virtual void | add_assign (const Operand &dst, Operand src) |
add an assignment from the action. | |
virtual void | add_src_unallocated_assign (const ContainerID &c, const le_bitrange &range) |
virtual void | clear () |
clear all states and will reset enable_bitmasked_set to true. | |
void | enable_bitmasked_set (bool enable) |
set true to enable bitmasked_set set, otherwise disable. default: enable. | |
virtual void | set_container_spec (ContainerID id, int size, bitvec live) |
set_container_spec will update the container spec. | |
Additional Inherited Members | |
Protected Member Functions inherited from solver::ActionSolverBase | |
std::optional< Error > | check_whole_container_set_with_none_source_allocated () const |
Result | try_container_set (const ContainerID dest, const RotateClassifiedAssigns &offset_assigns) const |
std::optional< Error > | validate_input () const |
Protected Attributes inherited from solver::ActionSolverBase | |
ordered_map< ContainerID, RotateClassifiedAssigns > | dest_assigns_i |
destination-clustered assignments. | |
bool | enable_bitmasked_set_i = true |
ordered_map< ContainerID, ContainerSpec > | specs_i |
ordered_map< ContainerID, bitvec > | src_unallocated_bits |
bits that will be written in this action but their sources have not been allcoated. | |
ActionMochaSolver checks basic mocha set constraints for an action that either (1) sources are all constants or action data: can be merge into one operand. (2) sources are of one container: all aligned. Also, we need to ensure that other allocated bits in the container will not be corrupted, and since set instruction on mocha are whole-container-set, all other bits that are not set in this action need to be not live.
|
overridevirtual |
solve checks that either
Implements solver::ActionSolverBase.