User loginNavigationTake FREE online C/C++ test now!Unix / Linux ProgrammingCode search made simpleYour feedback needed!As a webmaster of this site, I regard you as our most important critic and commentator. We value your opinion and want to know what we are doing right, what we could do better and any other words of wisdom you're willing to pass our way. It would be our greatest motivation which will help us in developing areas you would like to see in this site. We hope you will continue to encourage and support us in our future endeavors.
INDIA |
Compiler Optimization Techniques PART -II6. Loop Invariant Code Motion Here, the part of code that remains unchanged by the iterations of its immediate loops, is moved out of the loop. Ex: . . . . return i; This can be simplified as follows : int main ( void ) . . . . return i; 7. Loop Unrolling Here, the objective is to reduce the number of iterations in the body of the loop. This is done by Ex: . . . . return i; This code is modified as : int main ( void ) . . . . return i; 8. Dead Code Elimination Certain part of the code may not affect the program, or they might not even be reachable. Ex : i = 10; /* this part of code does not affect the program */ return i; The code is then modified as follows : i = 20; return i; } Your feedback helps to make the article better. --
|