tf_1.8_xla_doc
Public Member Functions | List of all members
xla::HloDCE Class Reference

#include <hlo_dce.h>

Inherits HloPassInterface.

Public Member Functions

StatusOr< bool > Run (HloModule *module) override
 Entry of xla::HloDCE pass. More...
 

Detailed Description

HLO pass which removes dead instructions from each computation in the module and removes dead computations from the module.

An instruction is dead if it is not reachable from the root. A computation is dead if it is not the entry computation of the module and it is not reachable from the entry computation.

This pass does not remove dead parameter instructions, as parameter instructions cannot be deleted.

Member Function Documentation

◆ Run()

StatusOr< bool > xla::HloDCE::Run ( HloModule module)
override

Entry of xla::HloDCE pass.

For sequence of computation in hlo module in post order

  1. Mark all the removable instruction in the computation
  2. Remove the marked dead root and its sibling operand.
  3. Collect live computation(computation that is called by instruction)
  4. Remove dead computation(which is not live computation)

The documentation for this class was generated from the following files: