Renjith G
Renjith G

Reputation: 4898

Concept of "dead code stripping" in compiler optimization options

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

Upvotes: 7

Views: 3937

Answers (2)

sash
sash

Reputation: 8725

Dead-code stripping is the process of removing unreferenced code from the executable file. If the code is unreferenced, it must not be used and therefore is not needed in the executable file. Removing dead code reduces the size of your executable and can help reduce paging.

Upvotes: 0

mP.
mP.

Reputation: 18266

The resulting executable will not include any "dead" or unreachable code, because theres no point as it can never be executed.

Upvotes: 9

Related Questions