P4C
The P4 Compiler
Loading...
Searching...
No Matches
saturationElim.h
1/*
2 * SPDX-FileCopyrightText: 2022 The P4 Language Consortium
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef MIDEND_SATURATIONELIM_H_
8#define MIDEND_SATURATIONELIM_H_
9
10#include "ir/ir.h"
11
12namespace P4 {
13
16 public:
19 static bool isSaturationOperation(const IR::Expression *expr);
20
25 static const IR::Mux *eliminate(const IR::Operation_Binary *binary);
26};
27
28} // namespace P4
29
30#endif /* MIDEND_SATURATIONELIM_H_ */
Contains utility functions for eliminating saturating arithmetic.
Definition saturationElim.h:15
static bool isSaturationOperation(const IR::Expression *expr)
Definition saturationElim.cpp:13
static const IR::Mux * eliminate(const IR::Operation_Binary *binary)
Definition saturationElim.cpp:18
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13