19#ifndef _MIDEND_PARAM_BINDING_H_
20#define _MIDEND_PARAM_BINDING_H_
35 std::map<const IR::Type *, const IR::InstanceRef *> by_type;
36 std::map<const IR::Parameter *, const IR::InstanceRef *> by_param;
37 std::map<const IR::Declaration_Variable *, const IR::InstanceRef *> by_declvar;
41 : typeMap(typeMap), isV1(isV1) {}
44 void bind(
const IR::Parameter *param);
48 void bind(
const IR::Declaration_Variable *var);
52 const IR::InstanceRef *
get(
const IR::Parameter *param)
const {
53 return by_param.count(param) ? by_param.at(param) :
nullptr;
58 const IR::InstanceRef *
get(
const IR::Declaration_Variable *var)
const {
59 return by_declvar.count(var) ? by_declvar.at(var) :
nullptr;
63 void postorder(
const IR::Parameter *param);
67 void postorder(
const IR::Declaration_Variable *var);
Definition param_binding.h:32
const IR::InstanceRef * get(const IR::Parameter *param) const
Definition param_binding.h:52
void bind(const IR::Parameter *param)
Add a new header or metadata instance bound to the given parameter.
Definition param_binding.cpp:23
const IR::InstanceRef * get(const IR::Declaration_Variable *var) const
Definition param_binding.h:58
void postorder(const IR::Parameter *param)
Add a new header or metadata instance bound to the given parameter.
Definition param_binding.cpp:46
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24