20#include "../common/options.h"
22#include "parseAnnotations.h"
23#include "unusedDeclarations.h"
27class ConstantFoldingPolicy;
60 return options.optimizationLevel > 0;
71 std::vector<DebugHook> hooks;
77 void addDebugHook(
const DebugHook &hook) { hooks.push_back(hook); }
79 const IR::P4Program *run(
const CompilerOptions &options,
const IR::P4Program *program,
80 std::ostream *outStream =
nullptr);
Definition frontends/common/options.h:30
Definition constantFolding.h:35
Definition frontends/p4/frontend.h:69
Definition frontends/p4/frontend.h:32
virtual ConstantFoldingPolicy * getConstantFoldingPolicy() const
Definition frontends/p4/frontend.h:66
virtual bool skipSideEffectOrdering() const
Definition frontends/p4/frontend.h:49
virtual std::vector< DebugHook > getDebugHooks() const
Definition frontends/p4/frontend.h:39
virtual ParseAnnotations * getParseAnnotations() const
Definition frontends/p4/frontend.h:44
virtual bool enableSubConstToAddTransform() const
Definition frontends/p4/frontend.h:53
virtual bool optimize(const CompilerOptions &options) const
Definition frontends/p4/frontend.h:59
Definition parseAnnotations.h:114
Definition unusedDeclarations.h:48
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
std::function< void(const char *manager, unsigned seqNo, const char *pass, const IR::Node *node)> DebugHook
Definition ir/pass_manager.h:38