Changeset 2ad1387 in OpenModelica


Ignore:
Timestamp:
2022-05-16T14:21:59+02:00 (2 years ago)
Author:
GitHub <noreply@…>
Branches:
maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master
Children:
dfa5c6bb, e6877db
Parents:
caa3fcca
git-author:
Andreas <38031952+AnHeuermann@…> (05/16/22 14:21:59)
git-committer:
GitHub <noreply@…> (05/16/22 14:21:59)
Message:

Don't replace constants with function calls. (#8951)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/BackEnd/BackendDAEOptimize.mo

    r60ede2f r2ad1387  
    768768      DAE.ComponentRef cr;
    769769      Option<DAE.VariableAttributes> attr,new_attr;
     770
     771    // Don't replace with function calls
     772    case (BackendDAE.VAR(bindExp=SOME(DAE.CALL())),_)
     773      then(inVar,inTpl);
    770774
    771775    case (v as BackendDAE.VAR(varName=cr,bindExp=SOME(e),values=attr),(repl,numrepl))
     
    34783482        repl := BackendVarTransform.emptyReplacements();
    34793483        repl := BackendVariable.traverseBackendDAEVars(globalKnownVars, removeConstantsFinder, repl);
     3484
     3485        (globalKnownVars, (repl, _)) := BackendVariable.traverseBackendDAEVarsWithUpdate(globalKnownVars, replaceFinalVarTraverser, (repl, 0));
     3486
    34803487        if Flags.isSet(Flags.DUMP_CONST_REPL) then
    34813488          BackendVarTransform.dumpReplacements(repl);
    34823489        end if;
    3483 
    3484         (globalKnownVars, (repl, _)) := BackendVariable.traverseBackendDAEVarsWithUpdate(globalKnownVars, replaceFinalVarTraverser, (repl, 0));
    34853490
    34863491        lsteqns := BackendEquation.equationList(shared.initialEqs);
Note: See TracChangeset for help on using the changeset viewer.