From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Diagram Disable structure affects Compiler Optimizations?

Is it expected behavior for the presence of a Diagram Disable structure to disable Compiler Optimizations within the structure?

 

For instance, below, Loop Invariant code and Constant Folding are both disabled when they are inside the "Enabled" case of a Diagram Disabled structure. This has been verified by benchmarking, and also the lack of "fuzzy wires".

 

DiagramDisableAffectsOptimizations.png

0 Kudos
Message 1 of 3
(2,527 Views)

I don't know exactly what it does but I can remember that in 8.0 and maybe 8.20 as well it was creating problem when building EXEs and I know as well that at least for early versions of 2010 it was also creating problem in some special cases when there were broken wires into them >> build would crash. I think it has been resolved but I think it shows that disable structure should be removed before building, at least that what I do.

 

My 2 cents.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 3
(2,508 Views)

Hey Jack,

 

I spoke with LabVIEW R&D about this one and the story goes like this.  The LabVIEW compiler actually treats a diagram disable structure as a flat sequence frame, and we currently don't do compiler optimizations inside frames.  So you could see the same behavior if you put code in a flat sequence:

 

ConstantFoldingWithDiagramDisable3.png

 

 It's something that simply hasn't been implemented yet but we should hopefully be focusing on it in the future.  But for now I have filed is as CAR #280812.  Hope that helps explain a little bit.   

Message 3 of 3
(2,460 Views)