| Electronic Components Datasheet Search |
|
AN3350 Datasheet(PDF) 106 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3350 Datasheet(HTML) 106 Page - STMicroelectronics |
|
106 / 185 page ![]() Intermediate optimizations AN3350 106/185 Doc ID 018512 Rev 2 vec[temp - 1] = value; } } 13.1.4 Copy propagation Copy propagation replaces variables with their original values if the variables do not change. This optimization reduces runtime stack size and improves execution speed. Table 20 explains how to control the optimization for copy propagation. For example, in Example 55 , the variable j is assigned the value of x. But j’s value is never changed, so the compiler replaces later instances of j with x, as shown in Example 56. By propagating x, the compiler is able to reduce the number of registers it uses to hold variable values, allowing more variables to be stored in registers instead of slower memory. Also, this optimization reduces the amount of stack memory used during function calls. Example 55 Before copy propagation void func_from(int* a, int x) { int i; int j; j = x; for (i = 0; i < j; i++) { a[i] = j; } } Example 56 After copy propagation void func_to(int* a, int x) { int i; int j; j = x; for (i = 0; i < x; i++) { a[i] = x; } } Table 20. Controlling copy propagation Turn control this option from here... use this setting Source code #pragma opt_propagation on | off | reset Command line -opt [no]prop[agation] |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |