From bcdb8eb5ae21e57119404216f63ef4d078bedcb4 Mon Sep 17 00:00:00 2001
From: Yuan Yu <yuanbyu@google.com>
Date: Thu, 17 Nov 2016 20:16:14 -0800
Subject: [PATCH] Small tidy-up. Fix the comment on the combination of CSE and
 control flow. Change: 139540050

---
 tensorflow/core/common_runtime/executor.cc | 9 ---------
 tensorflow/core/graph/optimizer_cse.cc     | 5 +++--
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/tensorflow/core/common_runtime/executor.cc b/tensorflow/core/common_runtime/executor.cc
index 990a854e3b1..a1006302036 100644
--- a/tensorflow/core/common_runtime/executor.cc
+++ b/tensorflow/core/common_runtime/executor.cc
@@ -919,15 +919,6 @@ class ExecutorState {
   void FindOrCreateChildFrame(FrameState* frame, int64 iter, const Node* node,
                               FrameState** child);
 
-  // Get the output frame/iter of a node. Create new frame/iteration if
-  // needed. If there are dead roots for the new iteration, we need to
-  // "execute" them so add them to the ready queue. Returns true if
-  // we need to check for the completion of output frame/iter.
-  void FindOrCreateOutputFrameIter(const TaggedNode& tagged_node,
-                                   const EntryVector& outputs,
-                                   FrameState** frame, int64* iter,
-                                   TaggedNodeSeq* ready);
-
   // Delete a frame. Called when the frame is done.
   void DeleteFrame(FrameState* frame, TaggedNodeSeq* ready);
 
diff --git a/tensorflow/core/graph/optimizer_cse.cc b/tensorflow/core/graph/optimizer_cse.cc
index f81baf4ee1d..59dff60ea3b 100644
--- a/tensorflow/core/graph/optimizer_cse.cc
+++ b/tensorflow/core/graph/optimizer_cse.cc
@@ -183,8 +183,9 @@ bool OptimizerCSE::Equivalent(const Node* a, const Node* b, Scratch* scratch) {
 bool OptimizerCSE::Optimize(std::function<bool(const Node*)> consider_fn) {
   // This very simple implementation works if the whole graph is one
   // giant basic block (because we just traverse nodes in a
-  // topological order).  We'll need to do something more
-  // sophisticated when we have control flow/loops/etc.
+  // topological order). This simple implementation works well
+  // with control flow/loops/etc. But we need to be careful about
+  // control flow if we want to add more sophisticated CSE optimizations.
 
   // TODO(jeff): We need to handle Update nodes specially, but dealing
   // with more general control flow will also solve this issue, and for