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
If the same pure function call with the same argument is present in multiple places in the Modelica source code, Common Subexpression Elimination should be applied to avoid useless repeated function calls, which are guaranteed to give the same output.
One way to implement this feature is the method employed in OpenModelica: for each function call, an equation $cseXX = function_call() is generated and an auxiliary variable $cseXX is added to the problem. Then, all function calls are replaced by the $cseXX variable. Matching and sorting then ensures that the function is called in the proper order.
The text was updated successfully, but these errors were encountered:
@arrangabriel The function-cse branch contains a starting point for the work. There is already a first implementation of expressions equivalence checks, and a scheleton for the transformation pass. You can keep working on that feature branch.
If the same pure function call with the same argument is present in multiple places in the Modelica source code, Common Subexpression Elimination should be applied to avoid useless repeated function calls, which are guaranteed to give the same output.
One way to implement this feature is the method employed in OpenModelica: for each function call, an equation $cseXX = function_call() is generated and an auxiliary variable $cseXX is added to the problem. Then, all function calls are replaced by the $cseXX variable. Matching and sorting then ensures that the function is called in the proper order.
The text was updated successfully, but these errors were encountered: