Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit d0e1fe9

Browse files
Willi BraunOpenModelica-Hudson
authored andcommitted
[BE] remove redundant Expression.simplify calls
Belonging to [master]: - #2273
1 parent 079c102 commit d0e1fe9

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Compiler/BackEnd/BackendEquation.mo

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,14 +1354,12 @@ algorithm
13541354

13551355
case (BackendDAE.EQUATION(exp=e1, scalar=e2, source=source, attr=attr)) equation
13561356
exp = Expression.createResidualExp(e1, e2);
1357-
(e, _) = ExpressionSimplify.simplify(exp);
1358-
then {BackendDAE.RESIDUAL_EQUATION(e, source, attr)};
1357+
then {BackendDAE.RESIDUAL_EQUATION(exp, source, attr)};
13591358

13601359
case (BackendDAE.SOLVED_EQUATION(componentRef=cr, exp=e2, source=source, attr=attr)) equation
13611360
e1 = Expression.crefExp(cr);
13621361
exp = Expression.createResidualExp(e1, e2);
1363-
(e, _) = ExpressionSimplify.simplify(exp);
1364-
then {BackendDAE.RESIDUAL_EQUATION(e, source, attr)};
1362+
then {BackendDAE.RESIDUAL_EQUATION(exp, source, attr)};
13651363

13661364
case (BackendDAE.ARRAY_EQUATION(dimSize=ds, left=e1, right=e2, source=source, attr=attr)) equation
13671365
exp = Expression.createResidualExp(e1, e2);
@@ -1405,8 +1403,7 @@ algorithm
14051403

14061404
case (BackendDAE.COMPLEX_EQUATION(left=e1, right=e2, source=source, attr=attr)) equation
14071405
exp = Expression.createResidualExp(e1, e2);
1408-
(e, _) = ExpressionSimplify.simplify(exp);
1409-
then {BackendDAE.RESIDUAL_EQUATION(e, source, attr)};
1406+
then {BackendDAE.RESIDUAL_EQUATION(exp, source, attr)};
14101407

14111408
case (backendEq as BackendDAE.RESIDUAL_EQUATION())
14121409
then {backendEq};

0 commit comments

Comments
 (0)