Opened 7 years ago

Last modified 3 years ago

#4952 assigned defect

Remove obsolete removeEqualFunctionCalls backend module

Reported by: Francesco Casella Owned by: Lennart Ochel
Priority: high Milestone:
Component: Backend Version:
Keywords: Cc:

Description

The removeEqualFunctionCalls module is currently active by default in the preOpt modules. It detects patterns like

a = f(b)
c = f(b)

and turns them into

a = f(b)
c = a

The wrapFunctionCalls method, which assigns all function calls to cse variables, has a wider scope and in fact makes the removeEqualFunctionCalls method obsolete.

I would suggest to remove the latter for good.

Change History (9)

comment:1 by Vitalij Ruge, 7 years ago

see #4881, too

comment:2 by Francesco Casella, 7 years ago

Owner: changed from Willi Braun to Lennart Ochel
Status: newassigned

For the time being, we can just turn it off by default, open a PR and see what happens to the testsuite

@lochel, can you take care of this?

comment:3 by Willi Braun, 7 years ago

@casella It's already done ;).
https://github.com/OpenModelica/OMCompiler/pull/2493

One error is coming from
Modelica.Mechanics.MultiBody.Examples.Systems.RobotR3.oneAxis

Error: Internal error IndexReduction.addStateOrderFinder failed for axis1.gear.spring.w_rel:STATE(1,axis1.gear.a_rel)(start = 0.0 unit = "rad/s" stateSelect=StateSelect.prefer )  "Relative angular velocity (= der(phi_rel))" type: Real  with derivative axis1.gear.spring.a_rel:VARIABLE(start = 0.0 unit = "rad/s2" )  "Relative angular acceleration (= der(w_rel))" type: Real

where the simulation seems still to work.

And really failing examples are:

openmodelica_cruntime_optimization_basic.testAlgLoop5.mos
openmodelica_cruntime_optimization_basic.testAlgLoop6.mos

comment:4 by Francesco Casella, 7 years ago

OK, I'll have a look ASAP

comment:5 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:6 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:7 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:8 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:9 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.