When i gone through my compiler(starcore,scc) optimization options, i can see one "dead code stripping".
What actually does when this option is enabled?
/Kanu
Dead Code Elimination is an optimization that removes code which does not affect the program results.
Dead Code Elimination : Dead code is a program snippet that is never executed or never reached in a program. It is a code that can be efficiently removed from the program without affecting any other part of the program. In case, a value is obtained and never used in the future, it is also regarded as dead code.
In some areas of computer programming, dead code is a section in the source code of a program which is executed but whose result is never used in any other computation. The execution of dead code wastes computation time and memory.
unreachable code is something that would never be executed because there is no flow control to reach the code. A dead code is something that gets (or might get) executed, but its results are never used.
The resulting executable will not include any "dead" or unreachable code, because theres no point as it can never be executed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With