Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Dead-code elimination
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Dynamic dead-code elimination== Dead code is normally considered dead ''unconditionally''. Therefore, it is reasonable attempting to remove dead code through dead-code elimination at [[compile time]]. However, in practice it is also common for code sections to represent dead or unreachable code only ''under certain conditions'', which may not be known at the time of compilation or assembly. Such conditions may be imposed by different [[runtime environment]]s (for example different versions of an operating system, or different sets and combinations of drivers or services loaded in a particular target environment), which may require different sets of special cases in the code, but at the same time become conditionally dead code for the other cases.<ref name="Paul_2002_DDCE" /><ref name="Paul_2002_DDCE2" /> Also, the software (for example, a driver or resident service) may be configurable to include or exclude certain features depending on user preferences, rendering unused code portions useless in a particular scenario.<ref name="Paul_2002_DDCE" /><ref name="Paul_2002_DDCE2" /> While modular software may be developed to dynamically load libraries on demand only, in most cases, it is not possible to load only the relevant routines from a particular library, and even if this would be supported, a routine may still include code sections which can be considered dead code in a given scenario, but could not be ruled out at compile time, already. The techniques used to dynamically detect demand, identify and resolve dependencies, remove such conditionally dead code, and to recombine the remaining code at [[load time|load]] or [[runtime (computing)|runtime]] are called '''dynamic dead-code elimination'''<ref name="Thammanur_2001_JIT" /><ref name="Kubice_2024" /><ref name="Conway_1995_DDCE" /> or '''dynamic dead-instruction elimination'''.<ref name="Butts_2002" /> Most programming languages, compilers and operating systems offer no or little more support than [[dynamic loading]] of libraries and [[late linking]], therefore software utilizing dynamic dead-code elimination is very rare in conjunction with languages [[ahead-of-time compilation|compiled ahead-of-time]] or written in [[assembly language]].<ref name="Paul_1997_FreeKEYB" /><ref name="Paul_2006_FreeKEYB" /><ref name="Paul_2001_DDCE" /> However, language implementations doing [[just-in-time compilation]] may dynamically optimize for dead-code elimination.<ref name="Conway_1995_DDCE" /><ref name="IBM_2002_Java" /><ref name="Polito_2015" /> Although with a rather different focus, similar approaches are sometimes also utilized for [[dynamic software updating]] and [[hot patching]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)