#3527 closed defect (fixed)
wrong blt, becasue inlining of functions fail for more then one output
Reported by: | Vitalij Ruge | Owned by: | somebody |
---|---|---|---|
Priority: | critical | Milestone: | 1.9.4 |
Component: | Frontend | Version: | |
Keywords: | Cc: | Willi Braun, Adrian Pop, Martin Sjölund |
Description
package inlineTest model A function f2 input Real x1; input Real x2; output Real y1; output Real y2; algorithm y1 := cos(x1 + x2); y2 := sin(x1); annotation(Inline = true); end f2; Real x, z, y; equation (x, z) = f2(x, y); z = sin(time * x); end A; model B Real x, z, y; equation x = cos(x + y); z = sin(x); z = sin(time * x); end B; end inlineTest;
In model B
I try to inline f2.
The result for A
: x,y,z are part of a loop.
The result for B
: x,z are part of a loop.
Change History (14)
follow-up: 4 comment:1 by , 9 years ago
comment:2 by , 9 years ago
Component: | Unknown → Backend |
---|
comment:3 by , 9 years ago
Component: | Backend → Unknown |
---|
In Inline.mo
(crefs,{cr},stmts,repl) = getFunctionInputsOutputBody
we have the limit for the outputs {cr} only one element
comment:4 by , 9 years ago
comment:5 by , 9 years ago
Cc: | added |
---|
comment:6 by , 9 years ago
would it be possible to fixe/extend the frondend modul Inline.inlineCall and forceInlineCall for this case?
comment:7 by , 9 years ago
Well, I cannot see a wrong BLT. It is just that the equation system is different due to inlining (by hand in the second case).
So is this just about the limitation of the inlining module? Or is the BLT really wrong?
follow-up: 9 comment:8 by , 9 years ago
f2 should give a warning: Inline=true was given, but the function has more than a single assignment statement to a single variable and cannot be inlined. Or someone needs to rewrite the module to handle this.
comment:9 by , 9 years ago
comment:10 by , 9 years ago
Milestone: | Future → 1.9.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:11 by , 9 years ago
Component: | Unknown → Frontend |
---|---|
Priority: | critical → high |
comment:12 by , 9 years ago
Priority: | high → critical |
---|
What flags do I need to reproduce the wrong BLT?