PR #13542: [NVIDIA] Change DCE to replay control deps for GTE-fusion simplification.
PR #13542: [NVIDIA] Change DCE to replay control deps for GTE-fusion simplification.

Imported from GitHub PR https://github.com/openxla/xla/pull/13542

We have seen a case when some optimization pipelines(ie tuple simplifier) add control deps to a GTE output of a fusion kernel to preserve execution order, DCE's un-used GTE simplification logic will error out trying to remove the GTE. Instead of replacing and removing, we can use ReplaceInstruction with relay_control_dependency set to true to move the control deps to the fusion instruction.
Copybara import of the project:

--
1de482f5a80f4e9a9b2c8203129111d2aaa63f28 by TJ <tjx@nvidia.com>:

Change DCE to replay control deps for GTE-fusion simplification.

Merging this change closes #13542

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/13542 from Tixxx:tixxx/dce_control_dep 1de482f5a80f4e9a9b2c8203129111d2aaa63f28
