You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The inline_single_instances pass takes a module definition which contains only a single instance and instantiates that instance at the parent level. So if we have a hierarchy like:
- ModuleDef Top
- Inst Son "son_inst"
- Inst Daughter "daughter_inst"
- ModuleDef Son
- Inst Grandchild "grandchild_inst"
since moduledef Grandchild only contains a single instance. Right now we name the lifted instance of Grandchild as son_inst$grandchild_inst since this is the naming logic generically used by inlining (infact it has to be so unless there is only a single instance inside).
At a high-level there are two ways to do this: one is to do the default naming and then rename the inlined instance. The other way to do this is to pass in a custom "namer" functor, which takes in the child and grandchild instances and returns a new name. The default value for this functor could be [](Instance* const child, Instance* const grandchild) { return child->name() + "$" + grandchild->name(); }. When inline single instances calls inlineInstance() the functor would be [](Instance* const child, Instance* const grandchild) { return child->name(); }.
The text was updated successfully, but these errors were encountered:
See StanfordAHA/gemstone#43.
The
inline_single_instances
pass takes a module definition which contains only a single instance and instantiates that instance at the parent level. So if we have a hierarchy like:We would want to transform that into
since moduledef
Grandchild
only contains a single instance. Right now we name the lifted instance ofGrandchild
asson_inst$grandchild_inst
since this is the naming logic generically used by inlining (infact it has to be so unless there is only a single instance inside).At a high-level there are two ways to do this: one is to do the default naming and then rename the inlined instance. The other way to do this is to pass in a custom "namer" functor, which takes in the child and grandchild instances and returns a new name. The default value for this functor could be
[](Instance* const child, Instance* const grandchild) { return child->name() + "$" + grandchild->name(); }
. When inline single instances callsinlineInstance()
the functor would be[](Instance* const child, Instance* const grandchild) { return child->name(); }
.The text was updated successfully, but these errors were encountered: