Module dce

Source
Expand description

§Dead Code Elimination

This optimization removes unused definitions. The pass is a combination of:

  1. A liveness analysis that keeps track of the uses of a definition,
  2. At the time of inspecting a definition, if it has no uses, it is removed.

This pass does not do CFG transformations. That is handled by simplify_cfg.

Constants§

DCE_NAME
GLOBALS_DCE_NAME

Functions§

create_dce_pass
create_globals_dce_pass
dce
Perform dead code (if any) elimination and return true if the function is modified.
globals_dce
Remove entire functions and globals from a module based on whether they are called / used or not, using a list of root ‘entry’ functions to perform a search.