Fix comments in ExecutorDialectToFunctionalConversion pass (NFC).

The term "aliased" is replaced with comments on the explicit forwarding of fetches to op results.

PiperOrigin-RevId: 318558280
Change-Id: I8bee37166539756953d089eb7fc5bb07115f8eaa
This commit is contained in:
Andy Ly 2020-06-26 15:50:57 -07:00 committed by TensorFlower Gardener
parent 3780057e34
commit 4d7d1a8c34

View File

@ -76,13 +76,14 @@ LogicalResult LiftIslandOpInnerOpsFromGraph(tf_executor::GraphOp graph) {
parent_block->getOperations().splice(graph_position, island_body,
island_body.begin(),
std::prev(island_body.end()));
// Forward inner op aliased results to outer island op result uses.
// Forward island fetches (tf_executor.yield operands) to island op result
// uses.
for (auto result :
llvm::zip(island_op.outputs(), island_op.GetYield().fetches()))
std::get<0>(result).replaceAllUsesWith(std::get<1>(result));
}
// Forward aliased results in graph to graph result uses.
// Forward graph fetches (tf_executor.fetch operands) to graph op result uses.
for (auto result : llvm::zip(graph.results(), graph.GetFetch().fetches()))
std::get<0>(result).replaceAllUsesWith(std::get<1>(result));