LabVIEW Compiler optimizations: Difference between revisions
Appearance
New page: =Compiler Optimization= ==Constant folding== See here ==Removing unused code== The LabVIEW compiler removes any unused code, code that is inside a case that will never execute is excluded... |
No edit summary |
||
| Line 1: | Line 1: | ||
=Compiler Optimization= | =Compiler Optimization= | ||
==Constant folding== | ==Constant folding== | ||
See | See [http://www.ni.com/news/inst_news_q2_08.htm this] NI news letter | ||
==Removing unused code== | ==Removing unused code== | ||
| Line 8: | Line 8: | ||
The same goes for property read nodes where the output is unwired. | The same goes for property read nodes where the output is unwired. | ||
See the following example: | See the following example: | ||
[[Image:CompilerOptimization.png]] | |||
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 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. | The lower part uses the caption reference and troughs an error. | ||
Revision as of 07:01, 1 June 2008
Compiler Optimization
Constant folding
See this NI news letter
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.