LabVIEW Compiler optimizations: Difference between revisions
Appearance
m Logmanoriginal moved page Compiler Optimization to LabVIEW Compiler optimizations: Clarify article subject |
m Mark as stub, add categories |
||
| Line 1: | Line 1: | ||
{{stub}} | |||
=Compiler Optimization= | =Compiler Optimization= | ||
==Constant folding== | ==Constant folding== | ||
| Line 13: | Line 14: | ||
==External links== | ==External links== | ||
*[http://zone.ni.com/devzone/cda/pub/p/id/347 Fuzzy Wires and Constant Folding in LabVIEW] | *[http://zone.ni.com/devzone/cda/pub/p/id/347 Fuzzy Wires and Constant Folding in LabVIEW] | ||
[[Category:LabVIEW internals]] | |||
Latest revision as of 17:04, 6 August 2024
| |
This article is a stub. You can help LabVIEW Wiki by expanding it. Please improve this article if you can. |
Compiler Optimization
Constant folding
Removing unused code
The LabVIEW compiler removes any unused code, code that is inside a case that will never execute is excluded form the compiled code. This gives the infamous warning on 8+ systems that opens a 7- VI where a case structure that is fed by a constant, the constant is replaced by a hidden control to maintain compatibility.
The same goes for property read nodes where the output is unwired.
See the following example:
The upper part tries to get a caption for a control that doesn't have a caption. Normally this would through an error, but the compiler doesn't execute the property because the caption reference isn't wired. The lower part uses the caption reference and troughs an error.