ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
clang_c_adjust_irep2.h File Reference
#include <util/symtab/context.h>
#include <util/symtab/namespace.h>
#include <irep2/irep2.h>
#include <cstddef>
#include <vector>
Include dependency graph for clang_c_adjust_irep2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  adjust_arm< Pass >
 Phase 6 (C.3) IREP2-native adjuster for the C frontend. More...
class  clang_c_adjust_irep2
struct  clang_c_adjust_irep2::arm_info
 One arm of the dispatch, as much of it as a caller may see: what it is called, and the guard deciding whether it claims a node. More...

Functions

template<class Pass, std::size_t N>
void run_adjust_arms (Pass &self, const adjust_arm< Pass >(&arms)[N], expr2tc &expr)
 Apply a pass's arms to one node in table order.
void adjust_comma_at_dispatch (exprt &expr, const namespacet &ns)
 Shape-2 probe (scope-clang-c-irep2.md §57): run the IREP2 comma rewrite at the point the legacy pass dispatches it, rather than in a second whole- program pass.

Function Documentation

◆ adjust_comma_at_dispatch()

void adjust_comma_at_dispatch ( exprt & expr,
const namespacet & ns )

Shape-2 probe (scope-clang-c-irep2.md §57): run the IREP2 comma rewrite at the point the legacy pass dispatches it, rather than in a second whole- program pass.

§55.4 attributes the comma arm's divergences to that ordering alone; this is the experiment that decides it.

◆ run_adjust_arms()

template<class Pass, std::size_t N>
void run_adjust_arms ( Pass & self,
const adjust_arm< Pass >(&) arms[N],
expr2tc & expr )

Apply a pass's arms to one node in table order.

Each guard is re-evaluated against the current node, so an arm that rewrites a node into another kind hands it to that kind's arm below.