Avoid iterator invalidation when recursively computing pattern depth.
Avoid iterator invalidation when recursively computing pattern depth.

computeDepth calls itself recursively, which may insert into minPatternDepth. minPatternDepth is a DenseMap, which invalidates iterators on insertion, so this may lead to asan failures.

PiperOrigin-RevId: 270374203

frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,renyi533/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,aam-at/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,annarev/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,jhseu/tensorflow,xzturn/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,aldian/tensorflow,gunan/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,annarev/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,annarev/tensorflow,yongtang/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,aldian/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_saved_model,xzturn/tensorflow,freedomtan/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,renyi533/tensorflow,sarvex/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,renyi533/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,arborh/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,frreiss/tensorflow-fred,davidzchen/tensorflow,davidzchen/tensorflow,xzturn/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,aldian/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,karllessard/tensorflow,aam-at/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,jhseu/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,petewarden/tensorflow,arborh/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,yongtang/tensorflow,annarev/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,ppwwyyxx/tensorflow,sarvex/tensorflow,tensorflow/tensorflow,arborh/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,jhseu/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,gunan/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,annarev/tensorflow,davidzchen/tensorflow,Intel-tensorflow/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,davidzchen/tensorflow,Intel-tensorflow/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,karllessard/tensorflow,renyi533/tensorflow,aldian/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,DavidNorman/tensorflow,frreiss/tensorflow-fred,DavidNorman/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,xzturn/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,annarev/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,sarvex/tensorflow,aam-at/tensorflow,sarvex/tensorflow,renyi533/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,cxxgtxy/tensorflow,arborh/tensorflow,aldian/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,aldian/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,sarvex/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,petewarden/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,aam-at/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,annarev/tensorflow,arborh/tensorflow,karllessard/tensorflow,adit-chandra/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,gunan/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,petewarden/tensorflow,renyi533/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,jhseu/tensorflow,xzturn/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,karllessard/tensorflow,renyi533/tensorflow,arborh/tensorflow,sarvex/tensorflow,aam-at/tensorflow,arborh/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,xzturn/tensorflow,yongtang/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,adit-chandra/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,DavidNorman/tensorflow,tensorflow/tensorflow,petewarden/tensorflow,yongtang/tensorflow,yongtang/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,gautam1858/tensorflow,yongtang/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,davidzchen/tensorflow,aldian/tensorflow,gautam1858/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,arborh/tensorflow,renyi533/tensorflow,annarev/tensorflow