Changeset 51a52b92 in OpenModelica


Ignore:
Timestamp:
2020-10-21T15:28:45+02:00 (3 years ago)
Author:
Adrian Pop <adrian.pop@…>
Children:
ef5f7a1e
Parents:
11b8174
git-author:
Per Östlund <perost86@…> (10/06/20 17:16:09)
git-committer:
Adrian Pop <adrian.pop@…> (10/21/20 15:28:45)
Message:

[NF] Fix if-equation handling for -d=-nfScalarize.

  • Remove branch selection in NFTyping.typeIfEquation when using -d=-nfScalarize, it shouldn't be needed anymore since it's done during flattening and is not safe to do at that point in the compilation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/NFFrontEnd/NFTyping.mo

    rc9471b8 r51a52b92  
    30563056  end for;
    30573057
    3058   // Do branch selection anyway if -d=-nfScalarize is set, otherwise turning of
    3059   // scalarization breaks currently.
    3060   if not Flags.isSet(Flags.NF_SCALARIZE) then
    3061     bl := bl2;
    3062     bl2 := {};
    3063 
    3064     for b in bl loop
    3065       bl2 := match b
    3066         case Equation.Branch.BRANCH()
    3067           guard b.conditionVar <= Variability.STRUCTURAL_PARAMETER
    3068           algorithm
    3069             b.condition := Ceval.evalExp(b.condition);
    3070           then
    3071             if Expression.isFalse(b.condition) then bl2 else b :: bl2;
    3072 
    3073         else b :: bl2;
    3074       end match;
    3075     end for;
    3076 
    3077     bl2 := listReverseInPlace(bl2);
    3078   end if;
    3079 
    30803058  ifEq := Equation.IF(bl2, source);
    30813059end typeIfEquation;
Note: See TracChangeset for help on using the changeset viewer.